home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 April: Mac OS SDK / Dev.CD Apr 98 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / AIncludes / Sound.a < prev    next >
Encoding:
Text File  |  1998-02-12  |  74.8 KB  |  2,265 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        Sound.a
  3. ;
  4. ;    Contains:    Sound Manager Interfaces.
  5. ;
  6. ;    Version:    Technology:    Sound Manager 3.3
  7. ;                Release:    Universal Interfaces 3.1
  8. ;
  9. ;    Copyright:    © 1986-1998 by Apple Computer, Inc., all rights reserved
  10. ;
  11. ;    Bugs?:        Please include the the file and version information (from above) with
  12. ;                the problem description.  Developers belonging to one of the Apple
  13. ;                developer programs can submit bug reports to:
  14. ;
  15. ;                    devsupport@apple.com
  16. ;
  17. ;
  18.     IF &TYPE('__SOUND__') = 'UNDEFINED' THEN
  19. __SOUND__ SET 1
  20.  
  21.     IF &TYPE('__MACTYPES__') = 'UNDEFINED' THEN
  22.     include 'MacTypes.a'
  23.     ENDIF
  24.     IF &TYPE('__DIALOGS__') = 'UNDEFINED' THEN
  25.     include 'Dialogs.a'
  26.     ENDIF
  27.     IF &TYPE('__COMPONENTS__') = 'UNDEFINED' THEN
  28.     include 'Components.a'
  29.     ENDIF
  30.     IF &TYPE('__MIXEDMODE__') = 'UNDEFINED' THEN
  31.     include 'MixedMode.a'
  32.     ENDIF
  33.     IF &TYPE('__MOVIES__') = 'UNDEFINED' THEN
  34.     include 'Movies.a'
  35.     ENDIF
  36.  
  37. ;                        * * *  N O T E  * * *
  38. ;
  39. ;    This file has been updated to include Sound Manager 3.3 interfaces.
  40. ;
  41. ;    Some of the Sound Manager 3.0 interfaces were not put into the InterfaceLib
  42. ;    that originally shipped with the PowerMacs. These missing functions and the
  43. ;    new 3.3 interfaces have been released in the SoundLib library for PowerPC
  44. ;    developers to link with. The runtime library for these functions are
  45. ;    installed by the Sound Manager. The following functions are found in SoundLib.
  46. ;
  47. ;        GetCompressionInfo(), GetSoundPreference(), SetSoundPreference(),
  48. ;        UnsignedFixedMulDiv(), SndGetInfo(), SndSetInfo(), GetSoundOutputInfo(),
  49. ;        SetSoundOutputInfo(), GetCompressionName(), SoundConverterOpen(),
  50. ;        SoundConverterClose(), SoundConverterGetBufferSizes(), SoundConverterBeginConversion(),
  51. ;        SoundConverterConvertBuffer(), SoundConverterEndConversion(),
  52. ;        AudioGetBass(), AudioGetInfo(), AudioGetMute(), AudioGetOutputDevice(),
  53. ;        AudioGetTreble(), AudioGetVolume(), AudioMuteOnEvent(), AudioSetBass(),
  54. ;        AudioSetMute(), AudioSetToDefaults(), AudioSetTreble(), AudioSetVolume(),
  55. ;        OpenMixerSoundComponent(), CloseMixerSoundComponent(), SoundComponentAddSource(),
  56. ;        SoundComponentGetInfo(), SoundComponentGetSource(), SoundComponentGetSourceData(),
  57. ;        SoundComponentInitOutputDevice(), SoundComponentPauseSource(),
  58. ;        SoundComponentPlaySourceBuffer(), SoundComponentRemoveSource(),
  59. ;        SoundComponentSetInfo(), SoundComponentSetOutput(), SoundComponentSetSource(),
  60. ;        SoundComponentStartSource(), SoundComponentStopSource(),
  61. ;        ParseAIFFHeader(), ParseSndHeader(), SoundConverterGetInfo(), SoundConverterSetInfo()
  62. ;
  63.  
  64. ;    Interfaces for Sound Driver, !!! OBSOLETE and NOT SUPPORTED !!!
  65. ;
  66. ;    These items are no longer defined, but appear here so that someone
  67. ;    searching the interfaces might find them. If you are using one of these
  68. ;    items, you must change your code to support the Sound Manager.
  69. ;
  70. ;        swMode, ftMode, ffMode
  71. ;        FreeWave, FFSynthRec, Tone, SWSynthRec, Wave, FTSoundRec
  72. ;        SndCompletionProcPtr
  73. ;        StartSound, StopSound, SoundDone
  74. ;
  75.  
  76.  
  77. ;  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  78. ;   constants
  79. ;  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  80.  
  81.  
  82.  
  83. soundListRsrc                    EQU        'snd '                ;Resource type used by Sound Manager
  84.  
  85. kSimpleBeepID                    EQU        1                    ;reserved resource ID for Simple Beep
  86.  
  87. rate48khz                        EQU        $BB800000            ;48000.00000 in fixed-point
  88. rate44khz                        EQU        $AC440000            ;44100.00000 in fixed-point
  89. rate22050hz                        EQU        $56220000            ;22050.00000 in fixed-point
  90. rate22khz                        EQU        $56EE8BA3            ;22254.54545 in fixed-point
  91. rate11khz                        EQU        $2B7745D1            ;11127.27273 in fixed-point
  92. rate11025hz                        EQU        $2B110000            ;11025.00000 in fixed-point
  93.  
  94.                                                             ;synthesizer numbers for SndNewChannel
  95. squareWaveSynth                    EQU        1                    ;square wave synthesizer
  96. waveTableSynth                    EQU        3                    ;wave table synthesizer
  97. sampledSynth                    EQU        5                    ;sampled sound synthesizer
  98.                                                             ;old Sound Manager MACE synthesizer numbers
  99. MACE3snthID                        EQU        11
  100. MACE6snthID                        EQU        13
  101.  
  102. kMiddleC                        EQU        60                    ;MIDI note value for middle C
  103.  
  104. kNoVolume                        EQU        0                    ;setting for no sound volume
  105. kFullVolume                        EQU        $0100                ;1.0, setting for full hardware output volume
  106.  
  107. stdQLength                        EQU        128
  108.  
  109. dataOffsetFlag                    EQU        $8000
  110.  
  111. kUseOptionalOutputDevice        EQU        -1                    ;only for Sound Manager 3.0 or later
  112.  
  113. notCompressed                    EQU        0                    ;compression ID's
  114. fixedCompression                EQU        -1                    ;compression ID for fixed-sized compression
  115. variableCompression                EQU        -2                    ;compression ID for variable-sized compression
  116.  
  117. twoToOne                        EQU        1
  118. eightToThree                    EQU        2
  119. threeToOne                        EQU        3
  120. sixToOne                        EQU        4
  121. sixToOnePacketSize                EQU        8
  122. threeToOnePacketSize            EQU        16
  123.  
  124. stateBlockSize                    EQU        64
  125. leftOverBlockSize                EQU        32
  126.  
  127. firstSoundFormat                EQU        $0001                ;general sound format
  128. secondSoundFormat                EQU        $0002                ;special sampled sound format (HyperCard)
  129.  
  130. dbBufferReady                    EQU        $00000001            ;double buffer is filled
  131. dbLastBuffer                    EQU        $00000004            ;last double buffer to play
  132.  
  133. sysBeepDisable                    EQU        $0000                ;SysBeep() enable flags
  134. sysBeepEnable                    EQU        $01
  135. sysBeepSynchronous                EQU        $02                    ;if bit set, make alert sounds synchronous
  136.  
  137. unitTypeNoSelection                EQU        $FFFF                ;unitTypes for AudioSelection.unitType
  138. unitTypeSeconds                    EQU        $0000
  139. ; PPCAsm thinks “extSH” is a directive and therefore can't be a constant (?)
  140. ; But the 68k Asm needs to have these constants, so wrap them inside TARGET_CPU_68K
  141.     IF TARGET_CPU_68K THEN
  142.  
  143. stdSH                            EQU        $00                    ;Standard sound header encode value
  144. extSH                            EQU        $FF                    ;Extended sound header encode value
  145. cmpSH                            EQU        $FE                    ;Compressed sound header encode value
  146.     ENDIF    ; TARGET_CPU_68K
  147. ; command numbers for SndDoCommand and SndDoImmediate
  148.  
  149. nullCmd                            EQU        0
  150. initCmd                            EQU        1
  151. freeCmd                            EQU        2
  152. quietCmd                        EQU        3
  153. flushCmd                        EQU        4
  154. reInitCmd                        EQU        5
  155. waitCmd                            EQU        10
  156. pauseCmd                        EQU        11
  157. resumeCmd                        EQU        12
  158. callBackCmd                        EQU        13
  159. syncCmd                            EQU        14
  160. availableCmd                    EQU        24
  161. versionCmd                        EQU        25
  162. totalLoadCmd                    EQU        26
  163. loadCmd                            EQU        27
  164. freqDurationCmd                    EQU        40
  165. restCmd                            EQU        41
  166. freqCmd                            EQU        42
  167. ampCmd                            EQU        43
  168. timbreCmd                        EQU        44
  169. getAmpCmd                        EQU        45
  170. volumeCmd                        EQU        46                    ;sound manager 3.0 or later only
  171. getVolumeCmd                    EQU        47                    ;sound manager 3.0 or later only
  172. clockComponentCmd                EQU        50                    ;sound manager 3.2.1 or later only
  173. getClockComponentCmd            EQU        51                    ;sound manager 3.2.1 or later only
  174. scheduledSoundCmd                EQU        52                    ;sound manager 3.3 or later only
  175. linkSoundComponentsCmd            EQU        53                    ;sound manager 3.3 or later only
  176. waveTableCmd                    EQU        60
  177. phaseCmd                        EQU        61
  178. soundCmd                        EQU        80
  179. bufferCmd                        EQU        81
  180. rateCmd                            EQU        82
  181. continueCmd                        EQU        83
  182. doubleBufferCmd                    EQU        84
  183. getRateCmd                        EQU        85
  184. rateMultiplierCmd                EQU        86
  185. getRateMultiplierCmd            EQU        87
  186. sizeCmd                            EQU        90                    ;obsolete command
  187. convertCmd                        EQU        91                    ;obsolete MACE command
  188.     IF OLDROUTINENAMES THEN
  189. ; channel initialization parameters
  190.  
  191. waveInitChannelMask                EQU        $07
  192. waveInitChannel0                EQU        $04                    ;wave table only, Sound Manager 2.0 and earlier
  193. waveInitChannel1                EQU        $05                    ;wave table only, Sound Manager 2.0 and earlier
  194. waveInitChannel2                EQU        $06                    ;wave table only, Sound Manager 2.0 and earlier
  195. waveInitChannel3                EQU        $07                    ;wave table only, Sound Manager 2.0 and earlier
  196. initChan0                        EQU        $04                    ;obsolete spelling
  197. initChan1                        EQU        $05                    ;obsolete spelling
  198. initChan2                        EQU        $06                    ;obsolete spelling
  199. initChan3                        EQU        $07                    ;obsolete spelling
  200.  
  201. outsideCmpSH                    EQU        0                    ;obsolete MACE constant
  202. insideCmpSH                        EQU        1                    ;obsolete MACE constant
  203. aceSuccess                        EQU        0                    ;obsolete MACE constant
  204. aceMemFull                        EQU        1                    ;obsolete MACE constant
  205. aceNilBlock                        EQU        2                    ;obsolete MACE constant
  206. aceBadComp                        EQU        3                    ;obsolete MACE constant
  207. aceBadEncode                    EQU        4                    ;obsolete MACE constant
  208. aceBadDest                        EQU        5                    ;obsolete MACE constant
  209. aceBadCmd                        EQU        6                    ;obsolete MACE constant
  210.     ENDIF    ; OLDROUTINENAMES
  211.  
  212. initChanLeft                    EQU        $0002                ;left stereo channel
  213. initChanRight                    EQU        $0003                ;right stereo channel
  214. initNoInterp                    EQU        $0004                ;no linear interpolation
  215. initNoDrop                        EQU        $0008                ;no drop-sample conversion
  216. initMono                        EQU        $0080                ;monophonic channel
  217. initStereo                        EQU        $00C0                ;stereo channel
  218. initMACE3                        EQU        $0300                ;MACE 3:1
  219. initMACE6                        EQU        $0400                ;MACE 6:1
  220. initPanMask                        EQU        $0003                ;mask for right/left pan values
  221. initSRateMask                    EQU        $0030                ;mask for sample rate values
  222. initStereoMask                    EQU        $00C0                ;mask for mono/stereo values
  223. initCompMask                    EQU        $FF00                ;mask for compression IDs
  224. ; Get&Set Sound Information Selectors
  225.  
  226. siActiveChannels                EQU        'chac'                ;active channels
  227. siActiveLevels                    EQU        'lmac'                ;active meter levels
  228. siAGCOnOff                        EQU        'agc '                ;automatic gain control state
  229. siAsync                            EQU        'asyn'                ;asynchronous capability
  230. siAVDisplayBehavior                EQU        'avdb'
  231. siChannelAvailable                EQU        'chav'                ;number of channels available
  232. siCompressionAvailable            EQU        'cmav'                ;compression types available
  233. siCompressionFactor                EQU        'cmfa'                ;current compression factor
  234. siCompressionHeader                EQU        'cmhd'                ;return compression header
  235. siCompressionNames                EQU        'cnam'                ;compression type names available
  236. siCompressionParams                EQU        'evaw'                ;compression parameters
  237. siCompressionType                EQU        'comp'                ;current compression type
  238. siContinuous                    EQU        'cont'                ;continous recording
  239. siDecompressionParams            EQU        'wave'                ;decompression parameters
  240. siDeviceBufferInfo                EQU        'dbin'                ;size of interrupt buffer
  241. siDeviceConnected                EQU        'dcon'                ;input device connection status
  242. siDeviceIcon                    EQU        'icon'                ;input device icon
  243. siDeviceName                    EQU        'name'                ;input device name
  244. siHardwareBalance                EQU        'hbal'
  245. siHardwareBalanceSteps            EQU        'hbls'
  246. siHardwareBass                    EQU        'hbas'
  247. siHardwareBassSteps                EQU        'hbst'
  248. siHardwareBusy                    EQU        'hwbs'                ;sound hardware is in use
  249. siHardwareFormat                EQU        'hwfm'                ;get hardware format
  250. siHardwareMute                    EQU        'hmut'                ;mute state of all hardware
  251. siHardwareTreble                EQU        'htrb'
  252. siHardwareTrebleSteps            EQU        'hwts'
  253. siHardwareVolume                EQU        'hvol'                ;volume level of all hardware
  254. siHardwareVolumeSteps            EQU        'hstp'                ;number of volume steps for hardware
  255. siHeadphoneMute                    EQU        'pmut'                ;mute state of headphones
  256. siHeadphoneVolume                EQU        'pvol'                ;volume level of headphones
  257. siHeadphoneVolumeSteps            EQU        'hdst'                ;number of volume steps for headphones
  258. siInputAvailable                EQU        'inav'                ;input sources available
  259. siInputGain                        EQU        'gain'                ;input gain
  260. siInputSource                    EQU        'sour'                ;input source selector
  261. siInputSourceNames                EQU        'snam'                ;input source names
  262. siLevelMeterOnOff                EQU        'lmet'                ;level meter state
  263. siModemGain                        EQU        'mgai'                ;modem input gain
  264. siMonitorAvailable                EQU        'mnav'
  265. siMonitorSource                    EQU        'mons'
  266. siNumberChannels                EQU        'chan'                ;current number of channels
  267. siOptionsDialog                    EQU        'optd'                ;display options dialog
  268. siOSTypeInputSource                EQU        'inpt'                ;input source by OSType
  269. siOSTypeInputAvailable            EQU        'inav'                ;list of available input source OSTypes
  270. siPlayThruOnOff                    EQU        'plth'                ;playthrough state
  271. siPostMixerSoundComponent        EQU        'psmx'                ;install post-mixer effect
  272. siPreMixerSoundComponent        EQU        'prmx'                ;install pre-mixer effect
  273. siQuality                        EQU        'qual'                ;quality setting
  274. siRateMultiplier                EQU        'rmul'                ;throttle rate setting
  275. siRecordingQuality                EQU        'qual'                ;recording quality
  276. siSampleRate                    EQU        'srat'                ;current sample rate
  277. siSampleRateAvailable            EQU        'srav'                ;sample rates available
  278. siSampleSize                    EQU        'ssiz'                ;current sample size
  279. siSampleSizeAvailable            EQU        'ssav'                ;sample sizes available
  280. siSetupCDAudio                    EQU        'sucd'                ;setup sound hardware for CD audio
  281. siSetupModemAudio                EQU        'sumd'                ;setup sound hardware for modem audio
  282. siSlopeAndIntercept                EQU        'flap'                ;floating point variables for conversion
  283. siSoundClock                    EQU        'sclk'
  284. siUseThisSoundClock                EQU        'sclc'                ;sdev uses this to tell the mixer to use his sound clock
  285. siSpeakerMute                    EQU        'smut'                ;mute state of all built-in speaker
  286. siSpeakerVolume                    EQU        'svol'                ;volume level of built-in speaker
  287. siSSpCPULoadLimit                EQU        '3dll'
  288. siSSpLocalization                EQU        '3dif'
  289. siSSpSpeakerSetup                EQU        '3dst'
  290. siStereoInputGain                EQU        'sgai'                ;stereo input gain
  291. siSubwooferMute                    EQU        'bmut'                ;mute state of sub-woofer
  292. siTwosComplementOnOff            EQU        'twos'                ;two's complement state
  293. siVolume                        EQU        'volu'                ;volume level of source
  294. siVoxRecordInfo                    EQU        'voxr'                ;VOX record parameters
  295. siVoxStopInfo                    EQU        'voxs'                ;VOX stop parameters
  296. siWideStereo                    EQU        'wide'                ;wide stereo setting
  297.  
  298. siCloseDriver                    EQU        'clos'                ;reserved for internal use only
  299. siInitializeDriver                EQU        'init'                ;reserved for internal use only
  300. siPauseRecording                EQU        'paus'                ;reserved for internal use only
  301. siUserInterruptProc                EQU        'user'                ;reserved for internal use only
  302. ;  input source Types
  303.  
  304. kInvalidSource                    EQU        $FFFFFFFF            ;this source may be returned from GetInfo if no other source is the monitored source
  305. kNoSource                        EQU        'none'                ;no source selection
  306. kCDSource                        EQU        'cd  '                ;internal CD player input
  307. kExtMicSource                    EQU        'emic'                ;external mic input
  308. kRCAInSource                    EQU        'irca'                ;RCA jack input
  309. kTVFMTunerSource                EQU        'tvfm'
  310. kDAVInSource                    EQU        'idav'                ;DAV analog input
  311. kIntMicSource                    EQU        'imic'                ;internal mic input
  312. kMediaBaySource                    EQU        'mbay'                ;media bay input
  313. kModemSource                    EQU        'modm'                ;modem input (internal modem on desktops, PCI input on PowerBooks)
  314. kPCCardSource                    EQU        'pcm '                ;PC Card pwm input
  315. kZoomVideoSource                EQU        'zvpc'                ;zoom video input
  316. kDVDSource                        EQU        'dvda'                ;DVD audio input
  317. ; Sound Component Types and Subtypes
  318.  
  319. kNoSoundComponentType            EQU        '****'
  320. kSoundComponentType                EQU        'sift'                ;component type
  321. kSoundComponentPPCType            EQU        'nift'                ;component type for PowerPC code
  322. kRate8SubType                    EQU        'ratb'                ;8-bit rate converter
  323. kRate16SubType                    EQU        'ratw'                ;16-bit rate converter
  324. kConverterSubType                EQU        'conv'                ;sample format converter
  325. kSndSourceSubType                EQU        'sour'                ;generic source component
  326. kMixerType                        EQU        'mixr'
  327. kMixer8SubType                    EQU        'mixb'                ;8-bit mixer
  328. kMixer16SubType                    EQU        'mixw'                ;16-bit mixer
  329. kSoundInputDeviceType            EQU        'sinp'                ;sound input component
  330. kWaveInSubType                    EQU        'wavi'                ;Windows Wave
  331. kSoundOutputDeviceType            EQU        'sdev'                ;sound output component
  332. kClassicSubType                    EQU        'clas'                ;classic hardware, i.e. Mac Plus
  333. kASCSubType                        EQU        'asc '                ;Apple Sound Chip device
  334. kDSPSubType                        EQU        'dsp '                ;DSP device
  335. kAwacsSubType                    EQU        'awac'                ;Another of Will's Audio Chips device
  336. kGCAwacsSubType                    EQU        'awgc'                ;Awacs audio with Grand Central DMA
  337. kSingerSubType                    EQU        'sing'                ;Singer (via Whitney) based sound
  338. kSinger2SubType                    EQU        'sng2'                ;Singer 2 (via Whitney) for Acme
  339. kWhitSubType                    EQU        'whit'                ;Whit sound component for PrimeTime 3
  340. kSoundBlasterSubType            EQU        'sbls'                ;Sound Blaster for CHRP
  341. kWaveOutSubType                    EQU        'wavo'                ;Windows Wave
  342. kDirectSoundSubType                EQU        'dsnd'                ;Direct Sound
  343. kUNIXsdevSubType                EQU        'un1x'                ;UNIX base sdev
  344. kSoundCompressor                EQU        'scom'
  345. kSoundDecompressor                EQU        'sdec'
  346. kAudioComponentType                EQU        'adio'                ;Audio components and sub-types
  347. kAwacsPhoneSubType                EQU        'hphn'
  348. kAudioVisionSpeakerSubType        EQU        'telc'
  349. kAudioVisionHeadphoneSubType    EQU        'telh'
  350. kPhilipsFaderSubType            EQU        'tvav'
  351. kSGSToneSubType                    EQU        'sgs0'
  352. kSoundEffectsType                EQU        'snfx'                ;sound effects type
  353. kSSpLocalizationSubType            EQU        'snd3'
  354. ; Format Types
  355.  
  356. kSoundNotCompressed                EQU        'NONE'                ;sound is not compressed
  357. k8BitOffsetBinaryFormat            EQU        'raw '                ;8-bit offset binary
  358. k16BitBigEndianFormat            EQU        'twos'                ;16-bit big endian
  359. k16BitLittleEndianFormat        EQU        'sowt'                ;16-bit little endian
  360. kFloat32Format                    EQU        'fl32'                ;32-bit floating point
  361. kFloat64Format                    EQU        'fl64'                ;64-bit floating point
  362. k24BitFormat                    EQU        'in24'                ;24-bit integer
  363. k32BitFormat                    EQU        'in32'                ;32-bit integer
  364. kMACE3Compression                EQU        'MAC3'                ;MACE 3:1
  365. kMACE6Compression                EQU        'MAC6'                ;MACE 6:1
  366. kCDXA4Compression                EQU        'cdx4'                ;CD/XA 4:1
  367. kCDXA2Compression                EQU        'cdx2'                ;CD/XA 2:1
  368. kIMACompression                    EQU        'ima4'                ;IMA 4:1
  369. kULawCompression                EQU        'ulaw'                ;µLaw 2:1
  370. kALawCompression                EQU        'alaw'                ;aLaw 2:1
  371. kMicrosoftADPCMFormat            EQU        $6D730002            ;Microsoft ADPCM - ACM code 2
  372. kDVIIntelIMAFormat                EQU        $6D730011            ;DVI/Intel IMA ADPCM - ACM code 17
  373. kDVAudioFormat                    EQU        'dvca'                ;DV Audio
  374. kOffsetBinary                    EQU        'raw '                ;for compatibility
  375. kTwosComplement                    EQU        'twos'                ;for compatibility
  376. kLittleEndianFormat                EQU        'sowt'                ;for compatibility
  377.     IF TARGET_RT_LITTLE_ENDIAN THEN
  378.  
  379. k16BitNativeEndianFormat        EQU        'sowt'
  380. k16BitNonNativeEndianFormat        EQU        'twos'
  381.     ELSE
  382.  
  383. k16BitNativeEndianFormat        EQU        'twos'
  384. k16BitNonNativeEndianFormat        EQU        'sowt'
  385.     ENDIF    ; TARGET_RT_LITTLE_ENDIAN
  386. ; Features Flags
  387.  
  388. k8BitRawIn                        EQU        $01                    ;data description
  389. k8BitTwosIn                        EQU        $02
  390. k16BitIn                        EQU        $04
  391. kStereoIn                        EQU        $08
  392. k8BitRawOut                        EQU        $0100
  393. k8BitTwosOut                    EQU        $0200
  394. k16BitOut                        EQU        $0400
  395. kStereoOut                        EQU        $0800
  396. kReverse                        EQU        $00010000            ;  function description
  397. kRateConvert                    EQU        $00020000
  398. kCreateSoundSource                EQU        $00040000
  399. kHighQuality                    EQU        $00400000            ;  performance description
  400. kNonRealTime                    EQU        $00800000
  401. ; SoundComponentPlaySourceBuffer action flags
  402.  
  403. kSourcePaused                    EQU        $01
  404. kPassThrough                    EQU        $00010000
  405. kNoSoundComponentChain            EQU        $00020000
  406. ; SoundParamBlock flags, usefull for OpenMixerSoundComponent
  407.  
  408. kNoMixing                        EQU        $01                    ;don't mix source
  409. kNoSampleRateConversion            EQU        $02                    ;don't convert sample rate (i.e. 11 kHz -> 22 kHz)
  410. kNoSampleSizeConversion            EQU        $04                    ;don't convert sample size (i.e. 16 -> 8)
  411. kNoSampleFormatConversion        EQU        $08                    ;don't convert sample format (i.e. 'twos' -> 'raw ')
  412. kNoChannelConversion            EQU        $10                    ;don't convert stereo/mono
  413. kNoDecompression                EQU        $20                    ;don't decompress (i.e. 'MAC3' -> 'raw ')
  414. kNoVolumeConversion                EQU        $40                    ;don't apply volume
  415. kNoRealtimeProcessing            EQU        $80                    ;won't run at interrupt time
  416. kScheduledSource                EQU        $0100                ;source is scheduled
  417. ; SoundParamBlock quality settings
  418.  
  419. kBestQuality                    EQU        $01                    ;use interpolation in rate conversion
  420. ; useful bit masks
  421.  
  422. kInputMask                        EQU        $000000FF            ;masks off input bits
  423. kOutputMask                        EQU        $0000FF00            ;masks off output bits
  424. kOutputShift                    EQU        8                    ;amount output bits are shifted
  425. kActionMask                        EQU        $00FF0000            ;masks off action bits
  426. kSoundComponentBits                EQU        $00FFFFFF
  427. ; audio atom types
  428.  
  429. kAudioFormatAtomType            EQU        'frma'
  430. kAudioEndianAtomType            EQU        'enda'
  431. kAudioTerminatorAtomType        EQU        0
  432. ; siAVDisplayBehavior types
  433.  
  434. kAVDisplayHeadphoneRemove        EQU        0                    ; monitor does not have a headphone attached
  435. kAVDisplayHeadphoneInsert        EQU        1                    ; monitor has a headphone attached
  436. kAVDisplayPlainTalkRemove        EQU        2                    ; monitor either sending no input through CPU input port or unable to tell if input is coming in
  437. kAVDisplayPlainTalkInsert        EQU        3                    ; monitor sending PlainTalk level microphone source input through sound input port
  438. ; Audio Component constants
  439.  
  440.                                                             ;Values for whichChannel parameter
  441. audioAllChannels                EQU        0                    ;All channels (usually interpreted as both left and right)
  442. audioLeftChannel                EQU        1                    ;Left channel
  443. audioRightChannel                EQU        2                    ;Right channel
  444.                                                             ;Values for mute parameter
  445. audioUnmuted                    EQU        0                    ;Device is unmuted
  446. audioMuted                        EQU        1                    ;Device is muted
  447.                                                             ;Capabilities flags definitions
  448. audioDoesMono                    EQU        $00000001            ;Device supports mono output
  449. audioDoesStereo                    EQU        $00000002            ;Device supports stereo output
  450. audioDoesIndependentChannels    EQU        $00000004            ;Device supports independent software control of each channel
  451. ; Sound Input Qualities
  452.  
  453. siCDQuality                        EQU        'cd  '                ;44.1kHz, stereo, 16 bit
  454. siBestQuality                    EQU        'best'                ;22kHz, mono, 8 bit
  455. siBetterQuality                    EQU        'betr'                ;22kHz, mono, MACE 3:1
  456. siGoodQuality                    EQU        'good'                ;22kHz, mono, MACE 6:1
  457.  
  458. siDeviceIsConnected                EQU        1                    ;input device is connected and ready for input
  459. siDeviceNotConnected            EQU        0                    ;input device is not connected
  460. siDontKnowIfConnected            EQU        -1                    ;can't tell if input device is connected
  461. siReadPermission                EQU        0                    ;permission passed to SPBOpenDevice
  462. siWritePermission                EQU        1                    ;permission passed to SPBOpenDevice
  463.  
  464. ;  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  465. ;   typedefs
  466. ;  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  467.  
  468.  
  469.  
  470. SndCommand                RECORD 0
  471. cmd                         ds.w    1                ; offset: $0 (0)
  472. param1                     ds.w    1                ; offset: $2 (2)
  473. param2                     ds.l    1                ; offset: $4 (4)
  474. sizeof                     EQU *                    ; size:   $8 (8)
  475.                         ENDR
  476.  
  477.  
  478. ; typedef SndChannel *                    SndChannelPtr
  479.  
  480. SndChannel                RECORD 0
  481. nextChan                 ds.l    1                ; offset: $0 (0)
  482. firstMod                 ds.l    1                ; offset: $4 (4)        ;  reserved for the Sound Manager 
  483. callBack                 ds.l    1                ; offset: $8 (8)
  484. userInfo                 ds.l    1                ; offset: $C (12)
  485. wait                     ds.l    1                ; offset: $10 (16)        ;  The following is for internal Sound Manager use only.
  486. cmdInProgress             ds        SndCommand        ; offset: $14 (20)
  487. flags                     ds.w    1                ; offset: $1C (28)
  488. qLength                     ds.w    1                ; offset: $1E (30)
  489. qHead                     ds.w    1                ; offset: $20 (32)
  490. qTail                     ds.w    1                ; offset: $22 (34)
  491. queue                     ds.b    128 * SndCommand.sizeof ; offset: $24 (36)
  492. sizeof                     EQU *                    ; size:   $424 (1060)
  493.                         ENDR
  494. ; MACE structures
  495. StateBlock                RECORD 0
  496. stateVar                 ds.w    64                ; offset: $0 (0)
  497. sizeof                     EQU *                    ; size:   $80 (128)
  498.                         ENDR
  499. ; typedef struct StateBlock *            StateBlockPtr
  500.  
  501. LeftOverBlock            RECORD 0
  502. count                     ds.l    1                ; offset: $0 (0)
  503. sampleArea                 ds.b    32                ; offset: $4 (4)
  504. sizeof                     EQU *                    ; size:   $24 (36)
  505.                         ENDR
  506. ; typedef struct LeftOverBlock *        LeftOverBlockPtr
  507.  
  508. ModRef                    RECORD 0
  509. modNumber                 ds.w    1                ; offset: $0 (0)
  510. modInit                     ds.l    1                ; offset: $2 (2)
  511. sizeof                     EQU *                    ; size:   $6 (6)
  512.                         ENDR
  513. SndListResource            RECORD 0
  514. format                     ds.w    1                ; offset: $0 (0)
  515. numModifiers             ds.w    1                ; offset: $2 (2)
  516. modifierPart             ds        ModRef            ; offset: $4 (4) <-- really an array of length one
  517. numCommands                 ds.w    1                ; offset: $A (10)
  518. commandPart                 ds        SndCommand        ; offset: $C (12) <-- really an array of length one
  519. dataPart                 ds.b    1                ; offset: $14 (20) <-- really an array of length one
  520.                          ORG 22
  521. sizeof                     EQU *                    ; size:   $16 (22)
  522.                         ENDR
  523. ; typedef struct SndListResource *        SndListPtr
  524.  
  525. ; typedef SndListPtr *                    SndListHandle
  526.  
  527. ; typedef SndListHandle                 SndListHndl
  528.  
  529. ; HyperCard sound resource format
  530. Snd2ListResource        RECORD 0
  531. format                     ds.w    1                ; offset: $0 (0)
  532. refCount                 ds.w    1                ; offset: $2 (2)
  533. numCommands                 ds.w    1                ; offset: $4 (4)
  534. commandPart                 ds        SndCommand        ; offset: $6 (6) <-- really an array of length one
  535. dataPart                 ds.b    1                ; offset: $E (14) <-- really an array of length one
  536.                          ORG 16
  537. sizeof                     EQU *                    ; size:   $10 (16)
  538.                         ENDR
  539. ; typedef struct Snd2ListResource *        Snd2ListPtr
  540.  
  541. ; typedef Snd2ListPtr *                    Snd2ListHandle
  542.  
  543. ; typedef Snd2ListHandle                 Snd2ListHndl
  544.  
  545. SoundHeader                RECORD 0
  546. samplePtr                 ds.l    1                ; offset: $0 (0)        ; if NIL then samples are in sampleArea
  547. length                     ds.l    1                ; offset: $4 (4)        ; length of sound in bytes
  548. sampleRate                 ds.l    1                ; offset: $8 (8)        ; sample rate for this sound
  549. loopStart                 ds.l    1                ; offset: $C (12)        ; start of looping portion
  550. loopEnd                     ds.l    1                ; offset: $10 (16)        ; end of looping portion
  551. encode                     ds.b    1                ; offset: $14 (20)        ; header encoding
  552. baseFrequency             ds.b    1                ; offset: $15 (21)        ; baseFrequency value
  553. sampleArea                 ds.b    1                ; offset: $16 (22) <-- really an array of length one ; space for when samples follow directly
  554.                          ORG 24
  555. sizeof                     EQU *                    ; size:   $18 (24)
  556.                         ENDR
  557. ; typedef struct SoundHeader *            SoundHeaderPtr
  558.  
  559. CmpSoundHeader            RECORD 0
  560. samplePtr                 ds.l    1                ; offset: $0 (0)        ; if nil then samples are in sample area
  561. numChannels                 ds.l    1                ; offset: $4 (4)        ; number of channels i.e. mono = 1
  562. sampleRate                 ds.l    1                ; offset: $8 (8)        ; sample rate in Apples Fixed point representation
  563. loopStart                 ds.l    1                ; offset: $C (12)        ; loopStart of sound before compression
  564. loopEnd                     ds.l    1                ; offset: $10 (16)        ; loopEnd of sound before compression
  565. encode                     ds.b    1                ; offset: $14 (20)        ; data structure used , stdSH, extSH, or cmpSH
  566. baseFrequency             ds.b    1                ; offset: $15 (21)        ; same meaning as regular SoundHeader
  567. numFrames                 ds.l    1                ; offset: $16 (22)        ; length in frames ( packetFrames or sampleFrames )
  568. AIFFSampleRate             ds        extended80        ; offset: $1A (26)        ; IEEE sample rate
  569. markerChunk                 ds.l    1                ; offset: $24 (36)        ; sync track
  570. format                     ds.l    1                ; offset: $28 (40)        ; data format type, was futureUse1
  571. futureUse2                 ds.l    1                ; offset: $2C (44)        ; reserved by Apple
  572. stateVars                 ds.l    1                ; offset: $30 (48)        ; pointer to State Block
  573. leftOverSamples             ds.l    1                ; offset: $34 (52)        ; used to save truncated samples between compression calls
  574. compressionID             ds.w    1                ; offset: $38 (56)        ; 0 means no compression, non zero means compressionID
  575. packetSize                 ds.w    1                ; offset: $3A (58)        ; number of bits in compressed sample packet
  576. snthID                     ds.w    1                ; offset: $3C (60)        ; resource ID of Sound Manager snth that contains NRT C/E
  577. sampleSize                 ds.w    1                ; offset: $3E (62)        ; number of bits in non-compressed sample
  578. sampleArea                 ds.b    1                ; offset: $40 (64) <-- really an array of length one ; space for when samples follow directly
  579.                          ORG 66
  580. sizeof                     EQU *                    ; size:   $42 (66)
  581.                         ENDR
  582. ; typedef struct CmpSoundHeader *        CmpSoundHeaderPtr
  583.  
  584. ExtSoundHeader            RECORD 0
  585. samplePtr                 ds.l    1                ; offset: $0 (0)        ; if nil then samples are in sample area
  586. numChannels                 ds.l    1                ; offset: $4 (4)        ; number of channels,  ie mono = 1
  587. sampleRate                 ds.l    1                ; offset: $8 (8)        ; sample rate in Apples Fixed point representation
  588. loopStart                 ds.l    1                ; offset: $C (12)        ; same meaning as regular SoundHeader
  589. loopEnd                     ds.l    1                ; offset: $10 (16)        ; same meaning as regular SoundHeader
  590. encode                     ds.b    1                ; offset: $14 (20)        ; data structure used , stdSH, extSH, or cmpSH
  591. baseFrequency             ds.b    1                ; offset: $15 (21)        ; same meaning as regular SoundHeader
  592. numFrames                 ds.l    1                ; offset: $16 (22)        ; length in total number of frames
  593. AIFFSampleRate             ds        extended80        ; offset: $1A (26)        ; IEEE sample rate
  594. markerChunk                 ds.l    1                ; offset: $24 (36)        ; sync track
  595. instrumentChunks         ds.l    1                ; offset: $28 (40)        ; AIFF instrument chunks
  596. AESRecording             ds.l    1                ; offset: $2C (44)
  597. sampleSize                 ds.w    1                ; offset: $30 (48)        ; number of bits in sample
  598. futureUse1                 ds.w    1                ; offset: $32 (50)        ; reserved by Apple
  599. futureUse2                 ds.l    1                ; offset: $34 (52)        ; reserved by Apple
  600. futureUse3                 ds.l    1                ; offset: $38 (56)        ; reserved by Apple
  601. futureUse4                 ds.l    1                ; offset: $3C (60)        ; reserved by Apple
  602. sampleArea                 ds.b    1                ; offset: $40 (64) <-- really an array of length one ; space for when samples follow directly
  603.                          ORG 66
  604. sizeof                     EQU *                    ; size:   $42 (66)
  605.                         ENDR
  606. ; typedef struct ExtSoundHeader *        ExtSoundHeaderPtr
  607.  
  608. SoundHeaderUnion        RECORD 0
  609. stdHeader                 ds        SoundHeader        ; offset: $0 (0)
  610.                          ORG 0
  611. cmpHeader                 ds        CmpSoundHeader ; offset: $0 (0)
  612.                          ORG 0
  613. extHeader                 ds        ExtSoundHeader ; offset: $0 (0)
  614. sizeof                     EQU *                    ; size:   $42 (66)
  615.                         ENDR
  616. ConversionBlock            RECORD 0
  617. destination                 ds.w    1                ; offset: $0 (0)
  618. unused                     ds.w    1                ; offset: $2 (2)
  619. inputPtr                 ds.l    1                ; offset: $4 (4)
  620. outputPtr                 ds.l    1                ; offset: $8 (8)
  621. sizeof                     EQU *                    ; size:   $C (12)
  622.                         ENDR
  623. ; typedef struct ConversionBlock *        ConversionBlockPtr
  624.  
  625. ;  ScheduledSoundHeader flags
  626.  
  627. kScheduledSoundDoScheduled        EQU        $01
  628. kScheduledSoundDoCallBack        EQU        $02
  629. ScheduledSoundHeader    RECORD 0
  630. u                         ds        SoundHeaderUnion ; offset: $0 (0)
  631. flags                     ds.l    1                ; offset: $42 (66)
  632. reserved                 ds.w    1                ; offset: $46 (70)
  633. callBackParam1             ds.w    1                ; offset: $48 (72)
  634. callBackParam2             ds.l    1                ; offset: $4A (74)
  635. startTime                 ds        TimeRecord        ; offset: $4E (78)
  636. sizeof                     EQU *                    ; size:   $5E (94)
  637.                         ENDR
  638. ; typedef struct ScheduledSoundHeader *    ScheduledSoundHeaderPtr
  639.  
  640. SMStatus                RECORD 0
  641. smMaxCPULoad             ds.w    1                ; offset: $0 (0)
  642. smNumChannels             ds.w    1                ; offset: $2 (2)
  643. smCurCPULoad             ds.w    1                ; offset: $4 (4)
  644. sizeof                     EQU *                    ; size:   $6 (6)
  645.                         ENDR
  646. ; typedef struct SMStatus *                SMStatusPtr
  647.  
  648. SCStatus                RECORD 0
  649. scStartTime                 ds.l    1                ; offset: $0 (0)
  650. scEndTime                 ds.l    1                ; offset: $4 (4)
  651. scCurrentTime             ds.l    1                ; offset: $8 (8)
  652. scChannelBusy             ds.b    1                ; offset: $C (12)
  653. scChannelDisposed         ds.b    1                ; offset: $D (13)
  654. scChannelPaused             ds.b    1                ; offset: $E (14)
  655. scUnused                 ds.b    1                ; offset: $F (15)
  656. scChannelAttributes         ds.l    1                ; offset: $10 (16)
  657. scCPULoad                 ds.l    1                ; offset: $14 (20)
  658. sizeof                     EQU *                    ; size:   $18 (24)
  659.                         ENDR
  660. ; typedef struct SCStatus *                SCStatusPtr
  661.  
  662. AudioSelection            RECORD 0
  663. unitType                 ds.l    1                ; offset: $0 (0)
  664. selStart                 ds.l    1                ; offset: $4 (4)
  665. selEnd                     ds.l    1                ; offset: $8 (8)
  666. sizeof                     EQU *                    ; size:   $C (12)
  667.                         ENDR
  668. ; typedef struct AudioSelection *        AudioSelectionPtr
  669.  
  670. SndDoubleBuffer            RECORD 0
  671. dbNumFrames                 ds.l    1                ; offset: $0 (0)
  672. dbFlags                     ds.l    1                ; offset: $4 (4)
  673. dbUserInfo                 ds.l    2                ; offset: $8 (8)
  674. dbSoundData                 ds.b    1                ; offset: $10 (16) <-- really an array of length one
  675.                          ORG 18
  676. sizeof                     EQU *                    ; size:   $12 (18)
  677.                         ENDR
  678. ; typedef struct SndDoubleBuffer *        SndDoubleBufferPtr
  679.  
  680. SndDoubleBufferHeader    RECORD 0
  681. dbhNumChannels             ds.w    1                ; offset: $0 (0)
  682. dbhSampleSize             ds.w    1                ; offset: $2 (2)
  683. dbhCompressionID         ds.w    1                ; offset: $4 (4)
  684. dbhPacketSize             ds.w    1                ; offset: $6 (6)
  685. dbhSampleRate             ds.l    1                ; offset: $8 (8)
  686. dbhBufferPtr             ds.l    2                ; offset: $C (12)
  687. dbhDoubleBack             ds.l    1                ; offset: $14 (20)
  688. sizeof                     EQU *                    ; size:   $18 (24)
  689.                         ENDR
  690. ; typedef struct SndDoubleBufferHeader * SndDoubleBufferHeaderPtr
  691.  
  692. SndDoubleBufferHeader2    RECORD 0
  693. dbhNumChannels             ds.w    1                ; offset: $0 (0)
  694. dbhSampleSize             ds.w    1                ; offset: $2 (2)
  695. dbhCompressionID         ds.w    1                ; offset: $4 (4)
  696. dbhPacketSize             ds.w    1                ; offset: $6 (6)
  697. dbhSampleRate             ds.l    1                ; offset: $8 (8)
  698. dbhBufferPtr             ds.l    2                ; offset: $C (12)
  699. dbhDoubleBack             ds.l    1                ; offset: $14 (20)
  700. dbhFormat                 ds.l    1                ; offset: $18 (24)
  701. sizeof                     EQU *                    ; size:   $1C (28)
  702.                         ENDR
  703. ; typedef struct SndDoubleBufferHeader2 * SndDoubleBufferHeader2Ptr
  704.  
  705. SoundInfoList            RECORD 0
  706. count                     ds.w    1                ; offset: $0 (0)
  707. infoHandle                 ds.l    1                ; offset: $2 (2)
  708. sizeof                     EQU *                    ; size:   $6 (6)
  709.                         ENDR
  710. ; typedef struct SoundInfoList *        SoundInfoListPtr
  711.  
  712. SoundComponentData        RECORD 0
  713. flags                     ds.l    1                ; offset: $0 (0)
  714. format                     ds.l    1                ; offset: $4 (4)
  715. numChannels                 ds.w    1                ; offset: $8 (8)
  716. sampleSize                 ds.w    1                ; offset: $A (10)
  717. sampleRate                 ds.l    1                ; offset: $C (12)
  718. sampleCount                 ds.l    1                ; offset: $10 (16)
  719. buffer                     ds.l    1                ; offset: $14 (20)
  720. reserved                 ds.l    1                ; offset: $18 (24)
  721. sizeof                     EQU *                    ; size:   $1C (28)
  722.                         ENDR
  723. ; typedef struct SoundComponentData *    SoundComponentDataPtr
  724.  
  725.  
  726.  
  727. ; typedef SoundParamBlock *                SoundParamBlockPtr
  728.  
  729. SoundParamBlock            RECORD 0
  730. recordSize                 ds.l    1                ; offset: $0 (0)        ; size of this record in bytes
  731. desc                     ds        SoundComponentData ; offset: $4 (4)        ; description of sound buffer
  732. rateMultiplier             ds.l    1                ; offset: $20 (32)        ; rate multiplier to apply to sound
  733. leftVolume                 ds.w    1                ; offset: $24 (36)        ; volumes to apply to sound
  734. rightVolume                 ds.w    1                ; offset: $26 (38)
  735. quality                     ds.l    1                ; offset: $28 (40)        ; quality to apply to sound
  736. filter                     ds.l    1                ; offset: $2C (44)        ; filter to apply to sound
  737. moreRtn                     ds.l    1                ; offset: $30 (48)        ; routine to call to get more data
  738. completionRtn             ds.l    1                ; offset: $34 (52)        ; routine to call when buffer is complete
  739. refCon                     ds.l    1                ; offset: $38 (56)        ; user refcon
  740. result                     ds.w    1                ; offset: $3C (60)        ; result
  741. sizeof                     EQU *                    ; size:   $3E (62)
  742.                         ENDR
  743. CompressionInfo            RECORD 0
  744. recordSize                 ds.l    1                ; offset: $0 (0)
  745. format                     ds.l    1                ; offset: $4 (4)
  746. compressionID             ds.w    1                ; offset: $8 (8)
  747. samplesPerPacket         ds.w    1                ; offset: $A (10)
  748. bytesPerPacket             ds.w    1                ; offset: $C (12)
  749. bytesPerFrame             ds.w    1                ; offset: $E (14)
  750. bytesPerSample             ds.w    1                ; offset: $10 (16)
  751. futureUse1                 ds.w    1                ; offset: $12 (18)
  752. sizeof                     EQU *                    ; size:   $14 (20)
  753.                         ENDR
  754. ; typedef struct CompressionInfo *        CompressionInfoPtr
  755.  
  756. ; typedef CompressionInfoPtr *            CompressionInfoHandle
  757.  
  758. ; variables for floating point conversion
  759. SoundSlopeAndInterceptRecord RECORD 0
  760. slope                     ds        Float64            ; offset: $0 (0)
  761. intercept                 ds        Float64            ; offset: $8 (8)
  762. minClip                     ds        Float64            ; offset: $10 (16)
  763. maxClip                     ds        Float64            ; offset: $18 (24)
  764. sizeof                     EQU *                    ; size:   $20 (32)
  765.                         ENDR
  766. ; typedef struct SoundSlopeAndInterceptRecord * SoundSlopeAndInterceptPtr
  767.  
  768. ; private thing to use as a reference to a Sound Converter
  769.  
  770.  
  771. ; private thing to use as a reference to a Sound Source
  772.  
  773.  
  774. ; typedef SoundSource *                    SoundSourcePtr
  775.  
  776. SoundComponentLink        RECORD 0
  777. description                 ds        ComponentDescription ; offset: $0 (0)    ; Describes the sound component
  778. mixerID                     ds.l    1                ; offset: $14 (20)        ; Reserved by Apple
  779. linkID                     ds.l    1                ; offset: $18 (24)        ; Reserved by Apple
  780. sizeof                     EQU *                    ; size:   $1C (28)
  781.                         ENDR
  782. ; typedef struct SoundComponentLink *    SoundComponentLinkPtr
  783.  
  784. AudioInfo                RECORD 0
  785. capabilitiesFlags         ds.l    1                ; offset: $0 (0)        ; Describes device capabilities
  786. reserved                 ds.l    1                ; offset: $4 (4)        ; Reserved by Apple
  787. numVolumeSteps             ds.w    1                ; offset: $8 (8)        ; Number of significant increments between min and max volume
  788. sizeof                     EQU *                    ; size:   $A (10)
  789.                         ENDR
  790. ; typedef struct AudioInfo *            AudioInfoPtr
  791.  
  792. AudioFormatAtom            RECORD 0
  793. size                     ds.l    1                ; offset: $0 (0)        ;  = sizeof(AudioFormatAtom)
  794. atomType                 ds.l    1                ; offset: $4 (4)        ;  = kAudioFormatAtomType
  795. format                     ds.l    1                ; offset: $8 (8)
  796. sizeof                     EQU *                    ; size:   $C (12)
  797.                         ENDR
  798. ; typedef struct AudioFormatAtom *        AudioFormatAtomPtr
  799.  
  800. AudioEndianAtom            RECORD 0
  801. size                     ds.l    1                ; offset: $0 (0)        ;  = sizeof(AudioEndianAtom)
  802. atomType                 ds.l    1                ; offset: $4 (4)        ;  = kAudioEndianAtomType
  803. littleEndian             ds.w    1                ; offset: $8 (8)
  804. sizeof                     EQU *                    ; size:   $A (10)
  805.                         ENDR
  806. ; typedef struct AudioEndianAtom *        AudioEndianAtomPtr
  807.  
  808. AudioTerminatorAtom        RECORD 0
  809. size                     ds.l    1                ; offset: $0 (0)        ;  = sizeof(AudioTerminatorAtom)
  810. atomType                 ds.l    1                ; offset: $4 (4)        ;  = kAudioTerminatorAtomType
  811. sizeof                     EQU *                    ; size:   $8 (8)
  812.                         ENDR
  813. ; typedef struct AudioTerminatorAtom *    AudioTerminatorAtomPtr
  814.  
  815. ;  Sound Input Structures
  816.  
  817.  
  818. ; typedef SPB *                            SPBPtr
  819.  
  820. ; user procedures called by sound input routines
  821. ; Sound Input Parameter Block
  822. SPB                        RECORD 0
  823. inRefNum                 ds.l    1                ; offset: $0 (0)        ; reference number of sound input device
  824. count                     ds.l    1                ; offset: $4 (4)        ; number of bytes to record
  825. milliseconds             ds.l    1                ; offset: $8 (8)        ; number of milliseconds to record
  826. bufferLength             ds.l    1                ; offset: $C (12)        ; length of buffer in bytes
  827. bufferPtr                 ds.l    1                ; offset: $10 (16)        ; buffer to store sound data in
  828. completionRoutine         ds.l    1                ; offset: $14 (20)        ; completion routine
  829. interruptRoutine         ds.l    1                ; offset: $18 (24)        ; interrupt routine
  830. userLong                 ds.l    1                ; offset: $1C (28)        ; user-defined field
  831. error                     ds.w    1                ; offset: $20 (32)        ; error
  832. unused1                     ds.l    1                ; offset: $22 (34)        ; reserved - must be zero
  833. sizeof                     EQU *                    ; size:   $26 (38)
  834.                         ENDR
  835.  
  836. ;  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  837. ;   prototypes
  838. ;  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  839.  
  840.  
  841.  
  842.  
  843. ;   These two routines for Get/SetSoundVol should no longer be used.
  844. ;   They were for old Apple Sound Chip machines, and do not support the DSP or PowerMacs.
  845. ;   Use Get/SetDefaultOutputVolume instead, if you must change the user's machine.
  846.  
  847.  
  848.  
  849.     IF TARGET_CPU_68K ** TARGET_CPU_68K THEN
  850. ;
  851. ; pascal void SetSoundVol(short level)
  852. ;
  853.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  854.         IMPORT_CFM_FUNCTION SetSoundVol
  855.     ENDIF
  856.  
  857.  
  858. ;
  859. ; pascal void GetSoundVol(short *level)
  860. ;
  861.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  862.         ; parameters:
  863.         ;    level           => A0
  864.         Macro
  865.         _GetSoundVol
  866.             clr.b               (A0)+
  867.             move.b              $0260,(A0)
  868.         EndM
  869.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  870.         IMPORT_CFM_FUNCTION GetSoundVol
  871.     ENDIF
  872.  
  873.     ENDIF
  874. ;  Sound Manager routines 
  875. ;
  876. ; pascal void SysBeep(short duration)
  877. ;
  878.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  879.         _SysBeep:    OPWORD    $A9C8
  880.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  881.         IMPORT_CFM_FUNCTION SysBeep
  882.     ENDIF
  883.  
  884. ;
  885. ; pascal OSErr SndDoCommand(SndChannelPtr chan, const SndCommand *cmd, Boolean noWait)
  886. ;
  887.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  888.         _SndDoCommand:    OPWORD    $A803
  889.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  890.         IMPORT_CFM_FUNCTION SndDoCommand
  891.     ENDIF
  892.  
  893. ;
  894. ; pascal OSErr SndDoImmediate(SndChannelPtr chan, const SndCommand *cmd)
  895. ;
  896.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  897.         _SndDoImmediate:    OPWORD    $A804
  898.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  899.         IMPORT_CFM_FUNCTION SndDoImmediate
  900.     ENDIF
  901.  
  902. ;
  903. ; pascal OSErr SndNewChannel(SndChannelPtr *chan, short synth, long init, SndCallBackUPP userRoutine)
  904. ;
  905.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  906.         _SndNewChannel:    OPWORD    $A807
  907.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  908.         IMPORT_CFM_FUNCTION SndNewChannel
  909.     ENDIF
  910.  
  911. ;
  912. ; pascal OSErr SndDisposeChannel(SndChannelPtr chan, Boolean quietNow)
  913. ;
  914.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  915.         _SndDisposeChannel:    OPWORD    $A801
  916.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  917.         IMPORT_CFM_FUNCTION SndDisposeChannel
  918.     ENDIF
  919.  
  920. ;
  921. ; pascal OSErr SndPlay(SndChannelPtr chan, SndListHandle sndHandle, Boolean async)
  922. ;
  923.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  924.         _SndPlay:    OPWORD    $A805
  925.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  926.         IMPORT_CFM_FUNCTION SndPlay
  927.     ENDIF
  928.  
  929.     IF OLDROUTINENAMES THEN
  930. ;
  931. ; pascal OSErr SndAddModifier(SndChannelPtr chan, Ptr modifier, short id, long init)
  932. ;
  933.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  934.         _SndAddModifier:    OPWORD    $A802
  935.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  936.         IMPORT_CFM_FUNCTION SndAddModifier
  937.     ENDIF
  938.  
  939.     ENDIF    ; OLDROUTINENAMES
  940. ;
  941. ; pascal OSErr SndControl(short id, SndCommand *cmd)
  942. ;
  943.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  944.         _SndControl:    OPWORD    $A806
  945.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  946.         IMPORT_CFM_FUNCTION SndControl
  947.     ENDIF
  948.  
  949. ;  Sound Manager 2.0 and later, uses _SoundDispatch 
  950. ;
  951. ; pascal NumVersion SndSoundManagerVersion(void )
  952. ;
  953.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  954.         Macro
  955.         _SndSoundManagerVersion
  956.             move.l              #$000C0008,D0
  957.             dc.w                $A800
  958.         EndM
  959.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  960.         IMPORT_CFM_FUNCTION SndSoundManagerVersion
  961.     ENDIF
  962.  
  963. ;
  964. ; pascal OSErr SndStartFilePlay(SndChannelPtr chan, short fRefNum, short resNum, long bufferSize, void *theBuffer, AudioSelectionPtr theSelection, FilePlayCompletionUPP theCompletion, Boolean async)
  965. ;
  966.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  967.         Macro
  968.         _SndStartFilePlay
  969.             move.l              #$0D000008,D0
  970.             dc.w                $A800
  971.         EndM
  972.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  973.         IMPORT_CFM_FUNCTION SndStartFilePlay
  974.     ENDIF
  975.  
  976. ;
  977. ; pascal OSErr SndPauseFilePlay(SndChannelPtr chan)
  978. ;
  979.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  980.         Macro
  981.         _SndPauseFilePlay
  982.             move.l              #$02040008,D0
  983.             dc.w                $A800
  984.         EndM
  985.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  986.         IMPORT_CFM_FUNCTION SndPauseFilePlay
  987.     ENDIF
  988.  
  989. ;
  990. ; pascal OSErr SndStopFilePlay(SndChannelPtr chan, Boolean quietNow)
  991. ;
  992.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  993.         Macro
  994.         _SndStopFilePlay
  995.             move.l              #$03080008,D0
  996.             dc.w                $A800
  997.         EndM
  998.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  999.         IMPORT_CFM_FUNCTION SndStopFilePlay
  1000.     ENDIF
  1001.  
  1002. ;
  1003. ; pascal OSErr SndChannelStatus(SndChannelPtr chan, short theLength, SCStatusPtr theStatus)
  1004. ;
  1005.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1006.         Macro
  1007.         _SndChannelStatus
  1008.             move.l              #$05100008,D0
  1009.             dc.w                $A800
  1010.         EndM
  1011.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1012.         IMPORT_CFM_FUNCTION SndChannelStatus
  1013.     ENDIF
  1014.  
  1015. ;
  1016. ; pascal OSErr SndManagerStatus(short theLength, SMStatusPtr theStatus)
  1017. ;
  1018.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1019.         Macro
  1020.         _SndManagerStatus
  1021.             move.l              #$03140008,D0
  1022.             dc.w                $A800
  1023.         EndM
  1024.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1025.         IMPORT_CFM_FUNCTION SndManagerStatus
  1026.     ENDIF
  1027.  
  1028. ;
  1029. ; pascal void SndGetSysBeepState(short *sysBeepState)
  1030. ;
  1031.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1032.         Macro
  1033.         _SndGetSysBeepState
  1034.             move.l              #$02180008,D0
  1035.             dc.w                $A800
  1036.         EndM
  1037.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1038.         IMPORT_CFM_FUNCTION SndGetSysBeepState
  1039.     ENDIF
  1040.  
  1041. ;
  1042. ; pascal OSErr SndSetSysBeepState(short sysBeepState)
  1043. ;
  1044.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1045.         Macro
  1046.         _SndSetSysBeepState
  1047.             move.l              #$011C0008,D0
  1048.             dc.w                $A800
  1049.         EndM
  1050.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1051.         IMPORT_CFM_FUNCTION SndSetSysBeepState
  1052.     ENDIF
  1053.  
  1054. ;
  1055. ; pascal OSErr SndPlayDoubleBuffer(SndChannelPtr chan, SndDoubleBufferHeaderPtr theParams)
  1056. ;
  1057.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1058.         Macro
  1059.         _SndPlayDoubleBuffer
  1060.             move.l              #$04200008,D0
  1061.             dc.w                $A800
  1062.         EndM
  1063.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1064.         IMPORT_CFM_FUNCTION SndPlayDoubleBuffer
  1065.     ENDIF
  1066.  
  1067. ;  MACE compression routines, uses _SoundDispatch 
  1068. ;
  1069. ; pascal NumVersion MACEVersion(void )
  1070. ;
  1071.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1072.         Macro
  1073.         _MACEVersion
  1074.             move.l              #$00000010,D0
  1075.             dc.w                $A800
  1076.         EndM
  1077.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1078.         IMPORT_CFM_FUNCTION MACEVersion
  1079.     ENDIF
  1080.  
  1081. ;
  1082. ; pascal void Comp3to1(const void *inBuffer, void *outBuffer, unsigned long cnt, StateBlockPtr inState, StateBlockPtr outState, unsigned long numChannels, unsigned long whichChannel)
  1083. ;
  1084.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1085.         Macro
  1086.         _Comp3to1
  1087.             move.l              #$00040010,D0
  1088.             dc.w                $A800
  1089.         EndM
  1090.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1091.         IMPORT_CFM_FUNCTION Comp3to1
  1092.     ENDIF
  1093.  
  1094. ;
  1095. ; pascal void Exp1to3(const void *inBuffer, void *outBuffer, unsigned long cnt, StateBlockPtr inState, StateBlockPtr outState, unsigned long numChannels, unsigned long whichChannel)
  1096. ;
  1097.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1098.         Macro
  1099.         _Exp1to3
  1100.             move.l              #$00080010,D0
  1101.             dc.w                $A800
  1102.         EndM
  1103.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1104.         IMPORT_CFM_FUNCTION Exp1to3
  1105.     ENDIF
  1106.  
  1107. ;
  1108. ; pascal void Comp6to1(const void *inBuffer, void *outBuffer, unsigned long cnt, StateBlockPtr inState, StateBlockPtr outState, unsigned long numChannels, unsigned long whichChannel)
  1109. ;
  1110.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1111.         Macro
  1112.         _Comp6to1
  1113.             move.l              #$000C0010,D0
  1114.             dc.w                $A800
  1115.         EndM
  1116.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1117.         IMPORT_CFM_FUNCTION Comp6to1
  1118.     ENDIF
  1119.  
  1120. ;
  1121. ; pascal void Exp1to6(const void *inBuffer, void *outBuffer, unsigned long cnt, StateBlockPtr inState, StateBlockPtr outState, unsigned long numChannels, unsigned long whichChannel)
  1122. ;
  1123.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1124.         Macro
  1125.         _Exp1to6
  1126.             move.l              #$00100010,D0
  1127.             dc.w                $A800
  1128.         EndM
  1129.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1130.         IMPORT_CFM_FUNCTION Exp1to6
  1131.     ENDIF
  1132.  
  1133. ;  Sound Manager 3.0 and later calls, uses _SoundDispatch 
  1134. ;
  1135. ; pascal OSErr GetSysBeepVolume(long *level)
  1136. ;
  1137.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1138.         Macro
  1139.         _GetSysBeepVolume
  1140.             move.l              #$02240018,D0
  1141.             dc.w                $A800
  1142.         EndM
  1143.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1144.         IMPORT_CFM_FUNCTION GetSysBeepVolume
  1145.     ENDIF
  1146.  
  1147. ;
  1148. ; pascal OSErr SetSysBeepVolume(long level)
  1149. ;
  1150.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1151.         Macro
  1152.         _SetSysBeepVolume
  1153.             move.l              #$02280018,D0
  1154.             dc.w                $A800
  1155.         EndM
  1156.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1157.         IMPORT_CFM_FUNCTION SetSysBeepVolume
  1158.     ENDIF
  1159.  
  1160. ;
  1161. ; pascal OSErr GetDefaultOutputVolume(long *level)
  1162. ;
  1163.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1164.         Macro
  1165.         _GetDefaultOutputVolume
  1166.             move.l              #$022C0018,D0
  1167.             dc.w                $A800
  1168.         EndM
  1169.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1170.         IMPORT_CFM_FUNCTION GetDefaultOutputVolume
  1171.     ENDIF
  1172.  
  1173. ;
  1174. ; pascal OSErr SetDefaultOutputVolume(long level)
  1175. ;
  1176.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1177.         Macro
  1178.         _SetDefaultOutputVolume
  1179.             move.l              #$02300018,D0
  1180.             dc.w                $A800
  1181.         EndM
  1182.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1183.         IMPORT_CFM_FUNCTION SetDefaultOutputVolume
  1184.     ENDIF
  1185.  
  1186. ;
  1187. ; pascal OSErr GetSoundHeaderOffset(SndListHandle sndHandle, long *offset)
  1188. ;
  1189.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1190.         Macro
  1191.         _GetSoundHeaderOffset
  1192.             move.l              #$04040018,D0
  1193.             dc.w                $A800
  1194.         EndM
  1195.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1196.         IMPORT_CFM_FUNCTION GetSoundHeaderOffset
  1197.     ENDIF
  1198.  
  1199. ;
  1200. ; pascal UnsignedFixed UnsignedFixedMulDiv(UnsignedFixed value, UnsignedFixed multiplier, UnsignedFixed divisor)
  1201. ;
  1202.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1203.         Macro
  1204.         _UnsignedFixedMulDiv
  1205.             move.l              #$060C0018,D0
  1206.             dc.w                $A800
  1207.         EndM
  1208.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1209.         IMPORT_CFM_FUNCTION UnsignedFixedMulDiv
  1210.     ENDIF
  1211.  
  1212. ;
  1213. ; pascal OSErr GetCompressionInfo(short compressionID, OSType format, short numChannels, short sampleSize, CompressionInfoPtr cp)
  1214. ;
  1215.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1216.         Macro
  1217.         _GetCompressionInfo
  1218.             move.l              #$07100018,D0
  1219.             dc.w                $A800
  1220.         EndM
  1221.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1222.         IMPORT_CFM_FUNCTION GetCompressionInfo
  1223.     ENDIF
  1224.  
  1225. ;
  1226. ; pascal OSErr SetSoundPreference(OSType theType, Str255 name, Handle settings)
  1227. ;
  1228.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1229.         Macro
  1230.         _SetSoundPreference
  1231.             move.l              #$06340018,D0
  1232.             dc.w                $A800
  1233.         EndM
  1234.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1235.         IMPORT_CFM_FUNCTION SetSoundPreference
  1236.     ENDIF
  1237.  
  1238. ;
  1239. ; pascal OSErr GetSoundPreference(OSType theType, Str255 name, Handle settings)
  1240. ;
  1241.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1242.         Macro
  1243.         _GetSoundPreference
  1244.             move.l              #$06380018,D0
  1245.             dc.w                $A800
  1246.         EndM
  1247.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1248.         IMPORT_CFM_FUNCTION GetSoundPreference
  1249.     ENDIF
  1250.  
  1251. ;
  1252. ; pascal OSErr OpenMixerSoundComponent(SoundComponentDataPtr outputDescription, long outputFlags, ComponentInstance *mixerComponent)
  1253. ;
  1254.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1255.         Macro
  1256.         _OpenMixerSoundComponent
  1257.             move.l              #$06140018,D0
  1258.             dc.w                $A800
  1259.         EndM
  1260.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1261.         IMPORT_CFM_FUNCTION OpenMixerSoundComponent
  1262.     ENDIF
  1263.  
  1264. ;
  1265. ; pascal OSErr CloseMixerSoundComponent(ComponentInstance ci)
  1266. ;
  1267.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1268.         Macro
  1269.         _CloseMixerSoundComponent
  1270.             move.l              #$02180018,D0
  1271.             dc.w                $A800
  1272.         EndM
  1273.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1274.         IMPORT_CFM_FUNCTION CloseMixerSoundComponent
  1275.     ENDIF
  1276.  
  1277. ;  Sound Manager 3.1 and later calls, uses _SoundDispatch 
  1278. ;
  1279. ; pascal OSErr SndGetInfo(SndChannelPtr chan, OSType selector, void *infoPtr)
  1280. ;
  1281.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1282.         Macro
  1283.         _SndGetInfo
  1284.             move.l              #$063C0018,D0
  1285.             dc.w                $A800
  1286.         EndM
  1287.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1288.         IMPORT_CFM_FUNCTION SndGetInfo
  1289.     ENDIF
  1290.  
  1291. ;
  1292. ; pascal OSErr SndSetInfo(SndChannelPtr chan, OSType selector, const void *infoPtr)
  1293. ;
  1294.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1295.         Macro
  1296.         _SndSetInfo
  1297.             move.l              #$06400018,D0
  1298.             dc.w                $A800
  1299.         EndM
  1300.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1301.         IMPORT_CFM_FUNCTION SndSetInfo
  1302.     ENDIF
  1303.  
  1304. ;
  1305. ; pascal OSErr GetSoundOutputInfo(Component outputDevice, OSType selector, void *infoPtr)
  1306. ;
  1307.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1308.         Macro
  1309.         _GetSoundOutputInfo
  1310.             move.l              #$06440018,D0
  1311.             dc.w                $A800
  1312.         EndM
  1313.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1314.         IMPORT_CFM_FUNCTION GetSoundOutputInfo
  1315.     ENDIF
  1316.  
  1317. ;
  1318. ; pascal OSErr SetSoundOutputInfo(Component outputDevice, OSType selector, const void *infoPtr)
  1319. ;
  1320.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1321.         Macro
  1322.         _SetSoundOutputInfo
  1323.             move.l              #$06480018,D0
  1324.             dc.w                $A800
  1325.         EndM
  1326.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1327.         IMPORT_CFM_FUNCTION SetSoundOutputInfo
  1328.     ENDIF
  1329.  
  1330. ;  Sound Manager 3.2 and later calls, uses _SoundDispatch 
  1331. ;
  1332. ; pascal OSErr GetCompressionName(OSType compressionType, Str255 compressionName)
  1333. ;
  1334.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1335.         Macro
  1336.         _GetCompressionName
  1337.             move.l              #$044C0018,D0
  1338.             dc.w                $A800
  1339.         EndM
  1340.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1341.         IMPORT_CFM_FUNCTION GetCompressionName
  1342.     ENDIF
  1343.  
  1344. ;
  1345. ; pascal OSErr SoundConverterOpen(const SoundComponentData *inputFormat, const SoundComponentData *outputFormat, SoundConverter *sc)
  1346. ;
  1347.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1348.         Macro
  1349.         _SoundConverterOpen
  1350.             move.l              #$06500018,D0
  1351.             dc.w                $A800
  1352.         EndM
  1353.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1354.         IMPORT_CFM_FUNCTION SoundConverterOpen
  1355.     ENDIF
  1356.  
  1357. ;
  1358. ; pascal OSErr SoundConverterClose(SoundConverter sc)
  1359. ;
  1360.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1361.         Macro
  1362.         _SoundConverterClose
  1363.             move.l              #$02540018,D0
  1364.             dc.w                $A800
  1365.         EndM
  1366.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1367.         IMPORT_CFM_FUNCTION SoundConverterClose
  1368.     ENDIF
  1369.  
  1370. ;
  1371. ; pascal OSErr SoundConverterGetBufferSizes(SoundConverter sc, unsigned long inputBytesTarget, unsigned long *inputFrames, unsigned long *inputBytes, unsigned long *outputBytes)
  1372. ;
  1373.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1374.         Macro
  1375.         _SoundConverterGetBufferSizes
  1376.             move.l              #$0A580018,D0
  1377.             dc.w                $A800
  1378.         EndM
  1379.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1380.         IMPORT_CFM_FUNCTION SoundConverterGetBufferSizes
  1381.     ENDIF
  1382.  
  1383. ;
  1384. ; pascal OSErr SoundConverterBeginConversion(SoundConverter sc)
  1385. ;
  1386.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1387.         Macro
  1388.         _SoundConverterBeginConversion
  1389.             move.l              #$025C0018,D0
  1390.             dc.w                $A800
  1391.         EndM
  1392.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1393.         IMPORT_CFM_FUNCTION SoundConverterBeginConversion
  1394.     ENDIF
  1395.  
  1396. ;
  1397. ; pascal OSErr SoundConverterConvertBuffer(SoundConverter sc, const void *inputPtr, unsigned long inputFrames, void *outputPtr, unsigned long *outputFrames, unsigned long *outputBytes)
  1398. ;
  1399.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1400.         Macro
  1401.         _SoundConverterConvertBuffer
  1402.             move.l              #$0C600018,D0
  1403.             dc.w                $A800
  1404.         EndM
  1405.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1406.         IMPORT_CFM_FUNCTION SoundConverterConvertBuffer
  1407.     ENDIF
  1408.  
  1409. ;
  1410. ; pascal OSErr SoundConverterEndConversion(SoundConverter sc, void *outputPtr, unsigned long *outputFrames, unsigned long *outputBytes)
  1411. ;
  1412.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1413.         Macro
  1414.         _SoundConverterEndConversion
  1415.             move.l              #$08640018,D0
  1416.             dc.w                $A800
  1417.         EndM
  1418.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1419.         IMPORT_CFM_FUNCTION SoundConverterEndConversion
  1420.     ENDIF
  1421.  
  1422. ;  Sound Manager 3.3 and later calls, uses _SoundDispatch 
  1423. ;
  1424. ; pascal OSErr SoundConverterGetInfo(SoundConverter sc, OSType selector, void *infoPtr)
  1425. ;
  1426.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1427.         Macro
  1428.         _SoundConverterGetInfo
  1429.             move.l              #$06680018,D0
  1430.             dc.w                $A800
  1431.         EndM
  1432.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1433.         IMPORT_CFM_FUNCTION SoundConverterGetInfo
  1434.     ENDIF
  1435.  
  1436. ;
  1437. ; pascal OSErr SoundConverterSetInfo(SoundConverter sc, OSType selector, void *infoPtr)
  1438. ;
  1439.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1440.         Macro
  1441.         _SoundConverterSetInfo
  1442.             move.l              #$066C0018,D0
  1443.             dc.w                $A800
  1444.         EndM
  1445.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1446.         IMPORT_CFM_FUNCTION SoundConverterSetInfo
  1447.     ENDIF
  1448.  
  1449.  
  1450. ;  Sound Component Functions
  1451. ;   basic sound component functions
  1452.  
  1453.  
  1454.  
  1455. ;
  1456. ; pascal ComponentResult SoundComponentInitOutputDevice(ComponentInstance ti, long actions)
  1457. ;
  1458.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1459.         Macro
  1460.         _SoundComponentInitOutputDevice
  1461.             move.l              #$00040001,-(sp)
  1462.             moveq               #0,D0
  1463.             dc.w                $A82A
  1464.         EndM
  1465.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1466.         IMPORT_CFM_FUNCTION SoundComponentInitOutputDevice
  1467.     ENDIF
  1468.  
  1469. ;
  1470. ; pascal ComponentResult SoundComponentSetSource(ComponentInstance ti, SoundSource sourceID, ComponentInstance source)
  1471. ;
  1472.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1473.         Macro
  1474.         _SoundComponentSetSource
  1475.             move.l              #$00080002,-(sp)
  1476.             moveq               #0,D0
  1477.             dc.w                $A82A
  1478.         EndM
  1479.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1480.         IMPORT_CFM_FUNCTION SoundComponentSetSource
  1481.     ENDIF
  1482.  
  1483. ;
  1484. ; pascal ComponentResult SoundComponentGetSource(ComponentInstance ti, SoundSource sourceID, ComponentInstance *source)
  1485. ;
  1486.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1487.         Macro
  1488.         _SoundComponentGetSource
  1489.             move.l              #$00080003,-(sp)
  1490.             moveq               #0,D0
  1491.             dc.w                $A82A
  1492.         EndM
  1493.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1494.         IMPORT_CFM_FUNCTION SoundComponentGetSource
  1495.     ENDIF
  1496.  
  1497. ;
  1498. ; pascal ComponentResult SoundComponentGetSourceData(ComponentInstance ti, SoundComponentDataPtr *sourceData)
  1499. ;
  1500.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1501.         Macro
  1502.         _SoundComponentGetSourceData
  1503.             move.l              #$00040004,-(sp)
  1504.             moveq               #0,D0
  1505.             dc.w                $A82A
  1506.         EndM
  1507.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1508.         IMPORT_CFM_FUNCTION SoundComponentGetSourceData
  1509.     ENDIF
  1510.  
  1511. ;
  1512. ; pascal ComponentResult SoundComponentSetOutput(ComponentInstance ti, SoundComponentDataPtr requested, SoundComponentDataPtr *actual)
  1513. ;
  1514.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1515.         Macro
  1516.         _SoundComponentSetOutput
  1517.             move.l              #$00080005,-(sp)
  1518.             moveq               #0,D0
  1519.             dc.w                $A82A
  1520.         EndM
  1521.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1522.         IMPORT_CFM_FUNCTION SoundComponentSetOutput
  1523.     ENDIF
  1524.  
  1525. ;  junction methods for the mixer, must be called at non-interrupt level
  1526. ;
  1527. ; pascal ComponentResult SoundComponentAddSource(ComponentInstance ti, SoundSource *sourceID)
  1528. ;
  1529.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1530.         Macro
  1531.         _SoundComponentAddSource
  1532.             move.l              #$00040101,-(sp)
  1533.             moveq               #0,D0
  1534.             dc.w                $A82A
  1535.         EndM
  1536.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1537.         IMPORT_CFM_FUNCTION SoundComponentAddSource
  1538.     ENDIF
  1539.  
  1540. ;
  1541. ; pascal ComponentResult SoundComponentRemoveSource(ComponentInstance ti, SoundSource sourceID)
  1542. ;
  1543.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1544.         Macro
  1545.         _SoundComponentRemoveSource
  1546.             move.l              #$00040102,-(sp)
  1547.             moveq               #0,D0
  1548.             dc.w                $A82A
  1549.         EndM
  1550.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1551.         IMPORT_CFM_FUNCTION SoundComponentRemoveSource
  1552.     ENDIF
  1553.  
  1554. ;  info methods
  1555. ;
  1556. ; pascal ComponentResult SoundComponentGetInfo(ComponentInstance ti, SoundSource sourceID, OSType selector, void *infoPtr)
  1557. ;
  1558.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1559.         Macro
  1560.         _SoundComponentGetInfo
  1561.             move.l              #$000C0103,-(sp)
  1562.             moveq               #0,D0
  1563.             dc.w                $A82A
  1564.         EndM
  1565.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1566.         IMPORT_CFM_FUNCTION SoundComponentGetInfo
  1567.     ENDIF
  1568.  
  1569. ;
  1570. ; pascal ComponentResult SoundComponentSetInfo(ComponentInstance ti, SoundSource sourceID, OSType selector, void *infoPtr)
  1571. ;
  1572.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1573.         Macro
  1574.         _SoundComponentSetInfo
  1575.             move.l              #$000C0104,-(sp)
  1576.             moveq               #0,D0
  1577.             dc.w                $A82A
  1578.         EndM
  1579.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1580.         IMPORT_CFM_FUNCTION SoundComponentSetInfo
  1581.     ENDIF
  1582.  
  1583. ;  control methods
  1584. ;
  1585. ; pascal ComponentResult SoundComponentStartSource(ComponentInstance ti, short count, SoundSource *sources)
  1586. ;
  1587.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1588.         Macro
  1589.         _SoundComponentStartSource
  1590.             move.l              #$00060105,-(sp)
  1591.             moveq               #0,D0
  1592.             dc.w                $A82A
  1593.         EndM
  1594.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1595.         IMPORT_CFM_FUNCTION SoundComponentStartSource
  1596.     ENDIF
  1597.  
  1598. ;
  1599. ; pascal ComponentResult SoundComponentStopSource(ComponentInstance ti, short count, SoundSource *sources)
  1600. ;
  1601.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1602.         Macro
  1603.         _SoundComponentStopSource
  1604.             move.l              #$00060106,-(sp)
  1605.             moveq               #0,D0
  1606.             dc.w                $A82A
  1607.         EndM
  1608.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1609.         IMPORT_CFM_FUNCTION SoundComponentStopSource
  1610.     ENDIF
  1611.  
  1612. ;
  1613. ; pascal ComponentResult SoundComponentPauseSource(ComponentInstance ti, short count, SoundSource *sources)
  1614. ;
  1615.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1616.         Macro
  1617.         _SoundComponentPauseSource
  1618.             move.l              #$00060107,-(sp)
  1619.             moveq               #0,D0
  1620.             dc.w                $A82A
  1621.         EndM
  1622.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1623.         IMPORT_CFM_FUNCTION SoundComponentPauseSource
  1624.     ENDIF
  1625.  
  1626. ;
  1627. ; pascal ComponentResult SoundComponentPlaySourceBuffer(ComponentInstance ti, SoundSource sourceID, SoundParamBlockPtr pb, long actions)
  1628. ;
  1629.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1630.         Macro
  1631.         _SoundComponentPlaySourceBuffer
  1632.             move.l              #$000C0108,-(sp)
  1633.             moveq               #0,D0
  1634.             dc.w                $A82A
  1635.         EndM
  1636.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1637.         IMPORT_CFM_FUNCTION SoundComponentPlaySourceBuffer
  1638.     ENDIF
  1639.  
  1640. ; Audio Components
  1641. ; Volume is described as a value between 0 and 1, with 0 indicating minimum
  1642. ;  volume and 1 indicating maximum volume; if the device doesn't support
  1643. ;  software control of volume, then a value of unimpErr is returned, indicating
  1644. ;  that these functions are not supported by the device
  1645.  
  1646. ;
  1647. ; pascal ComponentResult AudioGetVolume(ComponentInstance ac, short whichChannel, ShortFixed *volume)
  1648. ;
  1649.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1650.         Macro
  1651.         _AudioGetVolume
  1652.             move.l              #$00060000,-(sp)
  1653.             moveq               #0,D0
  1654.             dc.w                $A82A
  1655.         EndM
  1656.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1657.         IMPORT_CFM_FUNCTION AudioGetVolume
  1658.     ENDIF
  1659.  
  1660. ;
  1661. ; pascal ComponentResult AudioSetVolume(ComponentInstance ac, short whichChannel, ShortFixed volume)
  1662. ;
  1663.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1664.         Macro
  1665.         _AudioSetVolume
  1666.             move.l              #$00040001,-(sp)
  1667.             moveq               #0,D0
  1668.             dc.w                $A82A
  1669.         EndM
  1670.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1671.         IMPORT_CFM_FUNCTION AudioSetVolume
  1672.     ENDIF
  1673.  
  1674. ; If the device doesn't support software control of mute, then a value of unimpErr is
  1675. ;returned, indicating that these functions are not supported by the device.
  1676. ;
  1677. ; pascal ComponentResult AudioGetMute(ComponentInstance ac, short whichChannel, short *mute)
  1678. ;
  1679.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1680.         Macro
  1681.         _AudioGetMute
  1682.             move.l              #$00060002,-(sp)
  1683.             moveq               #0,D0
  1684.             dc.w                $A82A
  1685.         EndM
  1686.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1687.         IMPORT_CFM_FUNCTION AudioGetMute
  1688.     ENDIF
  1689.  
  1690. ;
  1691. ; pascal ComponentResult AudioSetMute(ComponentInstance ac, short whichChannel, short mute)
  1692. ;
  1693.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1694.         Macro
  1695.         _AudioSetMute
  1696.             move.l              #$00040003,-(sp)
  1697.             moveq               #0,D0
  1698.             dc.w                $A82A
  1699.         EndM
  1700.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1701.         IMPORT_CFM_FUNCTION AudioSetMute
  1702.     ENDIF
  1703.  
  1704. ; AudioSetToDefaults causes the associated device to reset its volume and mute values
  1705. ;(and perhaps other characteristics, e.g. attenuation) to "factory default" settings
  1706. ;
  1707. ; pascal ComponentResult AudioSetToDefaults(ComponentInstance ac)
  1708. ;
  1709.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1710.         Macro
  1711.         _AudioSetToDefaults
  1712.             move.l              #$00000004,-(sp)
  1713.             moveq               #0,D0
  1714.             dc.w                $A82A
  1715.         EndM
  1716.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1717.         IMPORT_CFM_FUNCTION AudioSetToDefaults
  1718.     ENDIF
  1719.  
  1720. ; This routine is required; it must be implemented by all audio components
  1721.  
  1722. ;
  1723. ; pascal ComponentResult AudioGetInfo(ComponentInstance ac, AudioInfoPtr info)
  1724. ;
  1725.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1726.         Macro
  1727.         _AudioGetInfo
  1728.             move.l              #$00040005,-(sp)
  1729.             moveq               #0,D0
  1730.             dc.w                $A82A
  1731.         EndM
  1732.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1733.         IMPORT_CFM_FUNCTION AudioGetInfo
  1734.     ENDIF
  1735.  
  1736. ;
  1737. ; pascal ComponentResult AudioGetBass(ComponentInstance ac, short whichChannel, short *bass)
  1738. ;
  1739.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1740.         Macro
  1741.         _AudioGetBass
  1742.             move.l              #$00060006,-(sp)
  1743.             moveq               #0,D0
  1744.             dc.w                $A82A
  1745.         EndM
  1746.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1747.         IMPORT_CFM_FUNCTION AudioGetBass
  1748.     ENDIF
  1749.  
  1750. ;
  1751. ; pascal ComponentResult AudioSetBass(ComponentInstance ac, short whichChannel, short bass)
  1752. ;
  1753.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1754.         Macro
  1755.         _AudioSetBass
  1756.             move.l              #$00040007,-(sp)
  1757.             moveq               #0,D0
  1758.             dc.w                $A82A
  1759.         EndM
  1760.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1761.         IMPORT_CFM_FUNCTION AudioSetBass
  1762.     ENDIF
  1763.  
  1764. ;
  1765. ; pascal ComponentResult AudioGetTreble(ComponentInstance ac, short whichChannel, short *Treble)
  1766. ;
  1767.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1768.         Macro
  1769.         _AudioGetTreble
  1770.             move.l              #$00060008,-(sp)
  1771.             moveq               #0,D0
  1772.             dc.w                $A82A
  1773.         EndM
  1774.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1775.         IMPORT_CFM_FUNCTION AudioGetTreble
  1776.     ENDIF
  1777.  
  1778. ;
  1779. ; pascal ComponentResult AudioSetTreble(ComponentInstance ac, short whichChannel, short Treble)
  1780. ;
  1781.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1782.         Macro
  1783.         _AudioSetTreble
  1784.             move.l              #$00040009,-(sp)
  1785.             moveq               #0,D0
  1786.             dc.w                $A82A
  1787.         EndM
  1788.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1789.         IMPORT_CFM_FUNCTION AudioSetTreble
  1790.     ENDIF
  1791.  
  1792. ;
  1793. ; pascal ComponentResult AudioGetOutputDevice(ComponentInstance ac, Component *outputDevice)
  1794. ;
  1795.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1796.         Macro
  1797.         _AudioGetOutputDevice
  1798.             move.l              #$0004000A,-(sp)
  1799.             moveq               #0,D0
  1800.             dc.w                $A82A
  1801.         EndM
  1802.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1803.         IMPORT_CFM_FUNCTION AudioGetOutputDevice
  1804.     ENDIF
  1805.  
  1806.  
  1807. ; This is routine is private to the AudioVision component.  It enables the watching of the mute key.
  1808. ;
  1809. ; pascal ComponentResult AudioMuteOnEvent(ComponentInstance ac, short muteOnEvent)
  1810. ;
  1811.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1812.         Macro
  1813.         _AudioMuteOnEvent
  1814.             move.l              #$00020081,-(sp)
  1815.             moveq               #0,D0
  1816.             dc.w                $A82A
  1817.         EndM
  1818.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1819.         IMPORT_CFM_FUNCTION AudioMuteOnEvent
  1820.     ENDIF
  1821.  
  1822.  
  1823. kDelegatedSoundComponentSelectors EQU    $0100
  1824. ;  Sound Input Manager routines, uses _SoundDispatch 
  1825. ;
  1826. ; pascal NumVersion SPBVersion(void )
  1827. ;
  1828.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1829.         Macro
  1830.         _SPBVersion
  1831.             move.l              #$00000014,D0
  1832.             dc.w                $A800
  1833.         EndM
  1834.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1835.         IMPORT_CFM_FUNCTION SPBVersion
  1836.     ENDIF
  1837.  
  1838. ;
  1839. ; pascal OSErr SndRecord(ModalFilterUPP filterProc, Point corner, OSType quality, SndListHandle *sndHandle)
  1840. ;
  1841.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1842.         Macro
  1843.         _SndRecord
  1844.             move.l              #$08040014,D0
  1845.             dc.w                $A800
  1846.         EndM
  1847.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1848.         IMPORT_CFM_FUNCTION SndRecord
  1849.     ENDIF
  1850.  
  1851. ;
  1852. ; pascal OSErr SndRecordToFile(ModalFilterUPP filterProc, Point corner, OSType quality, short fRefNum)
  1853. ;
  1854.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1855.         Macro
  1856.         _SndRecordToFile
  1857.             move.l              #$07080014,D0
  1858.             dc.w                $A800
  1859.         EndM
  1860.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1861.         IMPORT_CFM_FUNCTION SndRecordToFile
  1862.     ENDIF
  1863.  
  1864. ;
  1865. ; pascal OSErr SPBSignInDevice(short deviceRefNum, ConstStr255Param deviceName)
  1866. ;
  1867.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1868.         Macro
  1869.         _SPBSignInDevice
  1870.             move.l              #$030C0014,D0
  1871.             dc.w                $A800
  1872.         EndM
  1873.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1874.         IMPORT_CFM_FUNCTION SPBSignInDevice
  1875.     ENDIF
  1876.  
  1877. ;
  1878. ; pascal OSErr SPBSignOutDevice(short deviceRefNum)
  1879. ;
  1880.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1881.         Macro
  1882.         _SPBSignOutDevice
  1883.             move.l              #$01100014,D0
  1884.             dc.w                $A800
  1885.         EndM
  1886.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1887.         IMPORT_CFM_FUNCTION SPBSignOutDevice
  1888.     ENDIF
  1889.  
  1890. ;
  1891. ; pascal OSErr SPBGetIndexedDevice(short count, Str255 deviceName, Handle *deviceIconHandle)
  1892. ;
  1893.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1894.         Macro
  1895.         _SPBGetIndexedDevice
  1896.             move.l              #$05140014,D0
  1897.             dc.w                $A800
  1898.         EndM
  1899.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1900.         IMPORT_CFM_FUNCTION SPBGetIndexedDevice
  1901.     ENDIF
  1902.  
  1903. ;
  1904. ; pascal OSErr SPBOpenDevice(ConstStr255Param deviceName, short permission, long *inRefNum)
  1905. ;
  1906.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1907.         Macro
  1908.         _SPBOpenDevice
  1909.             move.l              #$05180014,D0
  1910.             dc.w                $A800
  1911.         EndM
  1912.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1913.         IMPORT_CFM_FUNCTION SPBOpenDevice
  1914.     ENDIF
  1915.  
  1916. ;
  1917. ; pascal OSErr SPBCloseDevice(long inRefNum)
  1918. ;
  1919.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1920.         Macro
  1921.         _SPBCloseDevice
  1922.             move.l              #$021C0014,D0
  1923.             dc.w                $A800
  1924.         EndM
  1925.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1926.         IMPORT_CFM_FUNCTION SPBCloseDevice
  1927.     ENDIF
  1928.  
  1929. ;
  1930. ; pascal OSErr SPBRecord(SPBPtr inParamPtr, Boolean asynchFlag)
  1931. ;
  1932.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1933.         Macro
  1934.         _SPBRecord
  1935.             move.l              #$03200014,D0
  1936.             dc.w                $A800
  1937.         EndM
  1938.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1939.         IMPORT_CFM_FUNCTION SPBRecord
  1940.     ENDIF
  1941.  
  1942. ;
  1943. ; pascal OSErr SPBRecordToFile(short fRefNum, SPBPtr inParamPtr, Boolean asynchFlag)
  1944. ;
  1945.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1946.         Macro
  1947.         _SPBRecordToFile
  1948.             move.l              #$04240014,D0
  1949.             dc.w                $A800
  1950.         EndM
  1951.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1952.         IMPORT_CFM_FUNCTION SPBRecordToFile
  1953.     ENDIF
  1954.  
  1955. ;
  1956. ; pascal OSErr SPBPauseRecording(long inRefNum)
  1957. ;
  1958.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1959.         Macro
  1960.         _SPBPauseRecording
  1961.             move.l              #$02280014,D0
  1962.             dc.w                $A800
  1963.         EndM
  1964.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1965.         IMPORT_CFM_FUNCTION SPBPauseRecording
  1966.     ENDIF
  1967.  
  1968. ;
  1969. ; pascal OSErr SPBResumeRecording(long inRefNum)
  1970. ;
  1971.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1972.         Macro
  1973.         _SPBResumeRecording
  1974.             move.l              #$022C0014,D0
  1975.             dc.w                $A800
  1976.         EndM
  1977.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1978.         IMPORT_CFM_FUNCTION SPBResumeRecording
  1979.     ENDIF
  1980.  
  1981. ;
  1982. ; pascal OSErr SPBStopRecording(long inRefNum)
  1983. ;
  1984.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1985.         Macro
  1986.         _SPBStopRecording
  1987.             move.l              #$02300014,D0
  1988.             dc.w                $A800
  1989.         EndM
  1990.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1991.         IMPORT_CFM_FUNCTION SPBStopRecording
  1992.     ENDIF
  1993.  
  1994. ;
  1995. ; pascal OSErr SPBGetRecordingStatus(long inRefNum, short *recordingStatus, short *meterLevel, unsigned long *totalSamplesToRecord, unsigned long *numberOfSamplesRecorded, unsigned long *totalMsecsToRecord, unsigned long *numberOfMsecsRecorded)
  1996. ;
  1997.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1998.         Macro
  1999.         _SPBGetRecordingStatus
  2000.             move.l              #$0E340014,D0
  2001.             dc.w                $A800
  2002.         EndM
  2003.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  2004.         IMPORT_CFM_FUNCTION SPBGetRecordingStatus
  2005.     ENDIF
  2006.  
  2007. ;
  2008. ; pascal OSErr SPBGetDeviceInfo(long inRefNum, OSType infoType, void *infoData)
  2009. ;
  2010.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  2011.         Macro
  2012.         _SPBGetDeviceInfo
  2013.             move.l              #$06380014,D0
  2014.             dc.w                $A800
  2015.         EndM
  2016.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  2017.         IMPORT_CFM_FUNCTION SPBGetDeviceInfo
  2018.     ENDIF
  2019.  
  2020. ;
  2021. ; pascal OSErr SPBSetDeviceInfo(long inRefNum, OSType infoType, void *infoData)
  2022. ;
  2023.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  2024.         Macro
  2025.         _SPBSetDeviceInfo
  2026.             move.l              #$063C0014,D0
  2027.             dc.w                $A800
  2028.         EndM
  2029.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  2030.         IMPORT_CFM_FUNCTION SPBSetDeviceInfo
  2031.     ENDIF
  2032.  
  2033. ;
  2034. ; pascal OSErr SPBMillisecondsToBytes(long inRefNum, long *milliseconds)
  2035. ;
  2036.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  2037.         Macro
  2038.         _SPBMillisecondsToBytes
  2039.             move.l              #$04400014,D0
  2040.             dc.w                $A800
  2041.         EndM
  2042.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  2043.         IMPORT_CFM_FUNCTION SPBMillisecondsToBytes
  2044.     ENDIF
  2045.  
  2046. ;
  2047. ; pascal OSErr SPBBytesToMilliseconds(long inRefNum, long *byteCount)
  2048. ;
  2049.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  2050.         Macro
  2051.         _SPBBytesToMilliseconds
  2052.             move.l              #$04440014,D0
  2053.             dc.w                $A800
  2054.         EndM
  2055.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  2056.         IMPORT_CFM_FUNCTION SPBBytesToMilliseconds
  2057.     ENDIF
  2058.  
  2059. ;
  2060. ; pascal OSErr SetupSndHeader(SndListHandle sndHandle, short numChannels, UnsignedFixed sampleRate, short sampleSize, OSType compressionType, short baseNote, unsigned long numBytes, short *headerLen)
  2061. ;
  2062.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  2063.         Macro
  2064.         _SetupSndHeader
  2065.             move.l              #$0D480014,D0
  2066.             dc.w                $A800
  2067.         EndM
  2068.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  2069.         IMPORT_CFM_FUNCTION SetupSndHeader
  2070.     ENDIF
  2071.  
  2072. ;
  2073. ; pascal OSErr SetupAIFFHeader(short fRefNum, short numChannels, UnsignedFixed sampleRate, short sampleSize, OSType compressionType, unsigned long numBytes, unsigned long numFrames)
  2074. ;
  2075.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  2076.         Macro
  2077.         _SetupAIFFHeader
  2078.             move.l              #$0B4C0014,D0
  2079.             dc.w                $A800
  2080.         EndM
  2081.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  2082.         IMPORT_CFM_FUNCTION SetupAIFFHeader
  2083.     ENDIF
  2084.  
  2085. ;  Sound Input Manager 1.1 and later calls, uses _SoundDispatch 
  2086. ;
  2087. ; pascal OSErr ParseAIFFHeader(short fRefNum, SoundComponentData *sndInfo, unsigned long *numFrames, unsigned long *dataOffset)
  2088. ;
  2089.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  2090.         Macro
  2091.         _ParseAIFFHeader
  2092.             move.l              #$07580014,D0
  2093.             dc.w                $A800
  2094.         EndM
  2095.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  2096.         IMPORT_CFM_FUNCTION ParseAIFFHeader
  2097.     ENDIF
  2098.  
  2099. ;
  2100. ; pascal OSErr ParseSndHeader(SndListHandle sndHandle, SoundComponentData *sndInfo, unsigned long *numFrames, unsigned long *dataOffset)
  2101. ;
  2102.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  2103.         Macro
  2104.         _ParseSndHeader
  2105.             move.l              #$085C0014,D0
  2106.             dc.w                $A800
  2107.         EndM
  2108.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  2109.         IMPORT_CFM_FUNCTION ParseSndHeader
  2110.     ENDIF
  2111.  
  2112.     IF ¬ TARGET_OS_MAC THEN
  2113. ;   Only to be used if you are writing a sound input component; this 
  2114. ;   is the param block for a read request from the SoundMgr to the   
  2115. ;   sound input component.  Not to be confused with the SPB struct   
  2116. ;   above, which is the param block for a read request from an app   
  2117. ;   to the SoundMgr.                                                 
  2118.  
  2119.  
  2120. ; typedef SndInputCmpParam *            SndInputCmpParamPtr
  2121.  
  2122. SndInputCmpParam        RECORD 0
  2123. ioCompletion             ds.l    1                ; offset: $0 (0)        ;  completion routine [pointer]
  2124. ioInterrupt                 ds.l    1                ; offset: $4 (4)        ;  interrupt routine [pointer]
  2125. ioResult                 ds.w    1                ; offset: $8 (8)        ;  I/O result code [word]
  2126. pad                         ds.w    1                ; offset: $A (10)
  2127. ioReqCount                 ds.l    1                ; offset: $C (12)
  2128. ioActCount                 ds.l    1                ; offset: $10 (16)
  2129. ioBuffer                 ds.l    1                ; offset: $14 (20)
  2130. ioMisc                     ds.l    1                ; offset: $18 (24)
  2131. sizeof                     EQU *                    ; size:   $1C (28)
  2132.                         ENDR
  2133. ;
  2134. ; pascal ComponentResult SndInputReadAsync(ComponentInstance self, SndInputCmpParamPtr SICParmPtr)
  2135. ;
  2136.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  2137.         Macro
  2138.         _SndInputReadAsync
  2139.             move.l              #$00040001,-(sp)
  2140.             moveq               #0,D0
  2141.             dc.w                $A82A
  2142.         EndM
  2143.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  2144.         IMPORT_CFM_FUNCTION SndInputReadAsync
  2145.     ENDIF
  2146.  
  2147. ;
  2148. ; pascal ComponentResult SndInputReadSync(ComponentInstance self, SndInputCmpParamPtr SICParmPtr)
  2149. ;
  2150.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  2151.         Macro
  2152.         _SndInputReadSync
  2153.             move.l              #$00040002,-(sp)
  2154.             moveq               #0,D0
  2155.             dc.w                $A82A
  2156.         EndM
  2157.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  2158.         IMPORT_CFM_FUNCTION SndInputReadSync
  2159.     ENDIF
  2160.  
  2161. ;
  2162. ; pascal ComponentResult SndInputPauseRecording(ComponentInstance self)
  2163. ;
  2164.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  2165.         Macro
  2166.         _SndInputPauseRecording
  2167.             move.l              #$00000003,-(sp)
  2168.             moveq               #0,D0
  2169.             dc.w                $A82A
  2170.         EndM
  2171.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  2172.         IMPORT_CFM_FUNCTION SndInputPauseRecording
  2173.     ENDIF
  2174.  
  2175. ;
  2176. ; pascal ComponentResult SndInputResumeRecording(ComponentInstance self)
  2177. ;
  2178.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  2179.         Macro
  2180.         _SndInputResumeRecording
  2181.             move.l              #$00000004,-(sp)
  2182.             moveq               #0,D0
  2183.             dc.w                $A82A
  2184.         EndM
  2185.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  2186.         IMPORT_CFM_FUNCTION SndInputResumeRecording
  2187.     ENDIF
  2188.  
  2189. ;
  2190. ; pascal ComponentResult SndInputStopRecording(ComponentInstance self)
  2191. ;
  2192.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  2193.         Macro
  2194.         _SndInputStopRecording
  2195.             move.l              #$00000005,-(sp)
  2196.             moveq               #0,D0
  2197.             dc.w                $A82A
  2198.         EndM
  2199.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  2200.         IMPORT_CFM_FUNCTION SndInputStopRecording
  2201.     ENDIF
  2202.  
  2203. ;
  2204. ; pascal ComponentResult SndInputGetStatus(ComponentInstance self, short *recordingStatus, unsigned long *totalSamplesToRecord, unsigned long *numberOfSamplesRecorded)
  2205. ;
  2206.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  2207.         Macro
  2208.         _SndInputGetStatus
  2209.             move.l              #$000C0006,-(sp)
  2210.             moveq               #0,D0
  2211.             dc.w                $A82A
  2212.         EndM
  2213.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  2214.         IMPORT_CFM_FUNCTION SndInputGetStatus
  2215.     ENDIF
  2216.  
  2217. ;
  2218. ; pascal ComponentResult SndInputGetDeviceInfo(ComponentInstance self, OSType infoType, void *infoData)
  2219. ;
  2220.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  2221.         Macro
  2222.         _SndInputGetDeviceInfo
  2223.             move.l              #$00080007,-(sp)
  2224.             moveq               #0,D0
  2225.             dc.w                $A82A
  2226.         EndM
  2227.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  2228.         IMPORT_CFM_FUNCTION SndInputGetDeviceInfo
  2229.     ENDIF
  2230.  
  2231. ;
  2232. ; pascal ComponentResult SndInputSetDeviceInfo(ComponentInstance self, OSType infoType, void *infoData)
  2233. ;
  2234.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  2235.         Macro
  2236.         _SndInputSetDeviceInfo
  2237.             move.l              #$00080008,-(sp)
  2238.             moveq               #0,D0
  2239.             dc.w                $A82A
  2240.         EndM
  2241.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  2242.         IMPORT_CFM_FUNCTION SndInputSetDeviceInfo
  2243.     ENDIF
  2244.  
  2245. ;
  2246. ; pascal ComponentResult SndInputInitHardware(ComponentInstance self)
  2247. ;
  2248.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  2249.         Macro
  2250.         _SndInputInitHardware
  2251.             move.l              #$00000009,-(sp)
  2252.             moveq               #0,D0
  2253.             dc.w                $A82A
  2254.         EndM
  2255.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  2256.         IMPORT_CFM_FUNCTION SndInputInitHardware
  2257.     ENDIF
  2258.  
  2259.     ENDIF
  2260.  
  2261.     ENDIF ; __SOUND__ 
  2262.  
  2263.